-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot get CORS to work in production #158
Comments
With the help of a friend found the culprit, I am posting the outcome here for future reference. You need to configure it with the fastcgi_pass. It turns out it works with the following configuration: `server {
}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all a great thank you for this starter kit,
In local development everything is working smoothly and it is so easy to set it up. I am just running into a problem with production. I am running with SSR and both the API and the FE are running on a subdomain. So my Laravel runs on one.example.com and my Nuxt on two.example.com. I have not made any changes to the config/cors.php, which seems pretty forgiving.
Yet I get the following CORS error, which I have tried to find a solution for high and low:
Access to XMLHttpRequest at 'http://one.example.com/api/upload' from origin 'http://two.example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Could this anyhow be related to the api and client both running on a subdomain? And if so, can anything be changed to the configuration to make this work? I am building a project that has to run on a subdomain so I cannot use the main.
The text was updated successfully, but these errors were encountered: