GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: call after_handlers for legitimate requests without body part by junekhan · Pull Request #771 · CrowCpp/Crow

Conversation

@junekhan

@junekhan junekhan commented Feb 21, 2024

Copy link
Copy Markdown
Contributor

This PR fixes #764

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
June Han
fix: call after_handlers for legitimate requests without body part
047e9ff
@junekhan
junekhan force-pushed the bugfix/CORS-headers branch from e07446b to 047e9ff Compare February 21, 2024 05:55
@quarkpunk

quarkpunk commented Feb 21, 2024

Copy link
Copy Markdown
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_

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@quarkpunk quarkpunk mentioned this pull request Feb 21, 2024
CORS problem in 1.1.0 #764
Closed
@gittiver
gittiver requested review from dranikpg and gittiver February 21, 2024 20:09
gittiver
gittiver approved these changes Feb 21, 2024
View reviewed changes
gittiver
gittiver approved these changes Feb 21, 2024
View reviewed changes
@gittiver
gittiver merged commit 5ecd04a into CrowCpp:master Feb 21, 2024
@TheDelta TheDelta mentioned this pull request May 8, 2024
Crow does not reply to browser preflight messages correctly when using CORs middleware #721
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gittiver gittiver gittiver approved these changes
@dranikpg dranikpg Awaiting requested review from dranikpg

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

CORS problem in 1.1.0

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@junekhan @quarkpunk @gittiver
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.