-
Notifications
You must be signed in to change notification settings - Fork 236
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
CORS policy not applied #950
Comments
I got the same problem. After playing around, the issue seems to be that loco server only returns Access-Control-Allow-Origin for the POST request, but not for OPTIONS (prelight) request. |
This is similar to #934, I'm going to see if I can make a PR to close both. |
seems latest version does reply with correct headers on preflight check: is this still happening in recent version? |
per #1009 i've moved this to 0.14.0 for now |
Description
I attempted to use a Dioxus frontend with Loco as my backend, but the CORS policy I've configured doesn't seem to be working correctly.
When making a fetch request from my frontend at 'http://localhost:8080' to my Loco backend at 'http://localhost:5150/api/register', I receive the following error:
Even though I have configured the CORS settings in my configuration file to prevent CORS issues, it appears they are not being applied:
When I check the middleware settings with the
cargo loco middleware --config
command, the output indicates that the configuration should work:Steps to Reproduce
http://localhost:8080
.Expected Behavior
The server should apply the CORS policy, allowing the request from the specified origin and responding appropriately.
The text was updated successfully, but these errors were encountered: