Skip to content
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 middleware: allowed_headers is defaulting to None #50

Closed
fuchsnj opened this issue Jan 14, 2018 · 5 comments
Closed

CORS middleware: allowed_headers is defaulting to None #50

fuchsnj opened this issue Jan 14, 2018 · 5 comments

Comments

@fuchsnj
Copy link
Contributor

fuchsnj commented Jan 14, 2018

The documentation for CorsBuilder::allowed_headers() says

If All is set, whatever is requested by the client in Access-Control-Request-Headers will be echoed back in the Access-Control-Allow-Headers header.
...
Defaults to All.

The code is correctly defaulting the internal headers value to All, but there is no code actually echoing back the Access-Control-Request-Headers, it just leaves the Access-Control-Allow-Headers header empty.

relevant line of code generating the response:
https://github.com/actix/actix-web/blob/master/src/middleware/cors.rs#L303

@fafhrd91
Copy link
Member

Thanks for report!

Btw would you like to join actix and help with development?

@fuchsnj
Copy link
Contributor Author

fuchsnj commented Jan 14, 2018

Sure, feel free to add me. I probably won't contribute too much until I get more familiar with actix.
Thanks!

@fafhrd91
Copy link
Member

fafhrd91 commented Jan 14, 2018

No problem, you already helped a lot.

Also that depends on your interests level, we need to do a lot to make actix usable on higher level. It requires a lot of functionality, like templates integration, better redis, better db integration, virtual hosting support, csrf, websockets client, maybe even http client

@fafhrd91
Copy link
Member

Nested applications

@fafhrd91
Copy link
Member

fixed in master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants