thorne51
Lowercase Authorization header
When calling our microservice with `$fetch(url, { headers: { Authorization: 'Bearer xyx' } }), the header interpreted by the microservice ends up as lowercase. Is there anyway to prevent the header from being lowercased?
4 replies
Worker env access
I'm building a web worker to post activity tracking to our API, although it doesn't seem like the worker is getting access to any of my environment variables. Some context:
- Worker is stored in
/assets/js/activity.worker.js
- Worker is exposed via plugin which imports worker using suffix import ActivityWorker from '@/assets/js/activity.worker?worker
- import.meta.env
has the following value in worker:
Adding a VITE_CORE_API
env variable to my .env
file adds the value correctly to import.meta.env
in the worker, although I would prefer not duplicating my existing CORE_API
env var just for this.
Is there any other way to get the env variable into my worker?6 replies
AWS Amplify hosting configuration
So we currently hava nuxt3 app that is deployed as multiple amplify instances (around 40) with different env configs (domains, etc.). We would like to get all the resources generated by amplify (logs, lambdas, cloudwatch, etc.) tagged for cost tracking. We would also like to set the log retention period automatically on the CloudWatch logs. I've been searching through the docs and checked the nitro config documentation and source, and can't figure out if there is a way to do this.
5 replies
Amplify trailing slashes
I'm having some trouble with hosting our Nuxt3 app on Amplify. For some reason Amplify keeps giving us a 301 redirect with a trailing slash, which seems to get rewritten back to without trailing slashes. Accessing https://spa.baseplay.co/about with Chrome dev tools open and inspecting the Network tab, shows that
about
gives 301 redirect to about/
and this can be observed in the address bar as well (helps to throttle the connection though). Then the address bar changes back to about
(minus trailing slash).
While this does not strictly break our about page, on item pages (which have some custom routing) this breaks completely as they are not generated upfront. What I've also noticed is that our GPT ads are not being shown, and I suspect the redirects might be the cause, although this is an entirely different issue alltogether.
Thanks in advance for any help/insights.2 replies