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

fix: call after_handlers for legitimate requests without body part #771

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

junekhan
Copy link
Contributor

This PR fixes #764

@witcherofthorns
Copy link
Contributor

Great! But, unfortunately, the "Access-Control-Allow-Origin" header does not appear in the response, although I see that it is placed in http_response.h, this is the last problem that remains related to CORS

Crow log:

[DEBUG] [http_response]: add_headerAccess-Control-Allow-Origin | http://localhost:8080
[DEBUG] [http_response]: add_headerAccess-Control-Allow-Methods | *
[DEBUG] [http_response]: add_headerAccess-Control-Allow-Headers | Accept, Origin, Content-Type, Authorization
[DEBUG] [http_response]: add_headerAccess-Control-Max-Age | 5
[DEBUG] [http_response]: add_headerAccess-Control-Allow-Credentials | true

Frontend server-response:

HTTP/1.1 204 No Content
Access-Control-Max-Age: 5
Access-Control-Allow-Headers: Accept, Origin, Content-Type, Authorization
Access-Control-Allow-Methods: *
Access-Control-Allow-Credentials: true

In any case, thank you very much! 👏 I somehow didn’t think to look at http_connection.h and see that there is need_to_call_after_handlers_

@gittiver gittiver merged commit 5ecd04a into CrowCpp:master Feb 21, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

CORS problem in 1.1.0
3 participants