- Issue created by @fago
- 🇦🇹Austria fago Vienna
Thinking about this topic a 2nd time, the CORS route seems to be better. The proxy-setup is rather complicated and might confuse people much more than a few CORS-requests running in the browser.
For nuxt dev mode, I got CORS working immediately.
For nuxt dev mode the following addition to nuxt.config.ts did the trick (replace origin URL with your drupal base-url obviously):vite: { server: { cors: { origin: ['http://xb-dev.ddev.site', 'https://xb-dev.ddev.site'], }, }, },
When running the regular nuxt server, a different configuration is going to be required.
However, a straight-forward configuration as following did not do the trick. Investigating.nitro: { cors: { origin: ['http://xb-dev.ddev.site', 'https://xb-dev.ddev.site'], methods: ['GET'], }, },