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
Preflight CORS requests are not hadled correctly #56
Comments
We did not handle correctly OPTIONS request in CORS preflight check. Now it should be fixed. Issue: #56
Fix pushed to master |
@KodeStar pls update here if it is working for you. |
I’ve not tried it yet, been busy trying to add features and fix bugs, will try to build from master later today or tomorrow |
Any chance you could put out a release with this change in it? It will be much easier for me to test. |
@KodeStar - released latest master as v0.15.6. Can you confirm that CORS preflight is now working? |
I think we have a success, it's not complaining about cors any longer, now I just have to work out why what I'm trying to send isn't working :) |
Would it be possible to send the audioserve_token as a custom header instead of a cookie? The issue is, because the server and the frontend aren't on the same address it wont let me set the cookie. So all my subsequent requests to endpoints fail. edit Nvm, I looked through the auth.rs code and realised it could be sent via an Authorization bearer token! |
@KodeStar, |
I was originally using axios and passing
|
@ Kodestar Hmm, this make sense - our cookie is now Anyhow if bearer token working for you it's good solution, as this will in both development and production set up. If there are still issues with CORS let me know, otherwise I think we can close this issue. |
Agreed :) |
CORS Headers looks working OK. However still some change needs to be done on cookie - created new issue fo this #64 |
When using with
--cors
header and other web client, served from different location then API, and which sends preflight requests , thenOPTIONS preflight for /authenticate return 401 status,
thus
client/web browser cannot access the endpoint
OPTIONS requests handling has to be fixed in audioserve - especially when --cors switch is on.
The text was updated successfully, but these errors were encountered: