Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix cors#5772

Merged
wiz merged 1 commit intomasterfrom
nymkappa/cors
Mar 29, 2025
Merged

fix cors#5772
wiz merged 1 commit intomasterfrom
nymkappa/cors

Conversation

@nymkappa
Copy link
Member

@nymkappa nymkappa commented Feb 4, 2025

No description provided.

@nymkappa nymkappa requested a review from wiz February 4, 2025 18:25
@cla-bot cla-bot bot added the cla-signed label Feb 4, 2025
Copy link
Member

@wiz wiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a more reasonable list of headers

generate CORS configuration from origin header

set $cors_methods 'GET, POST, PUT, DELETE, OPTIONS';
set $cors_origin 'https://mempool.space';
set $cors_headers 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With';
set $cors_expose_headers 'X-Total-Count';
set $cors_credentials 'true';

@nymkappa
Copy link
Member Author

nymkappa commented Feb 4, 2025

this is a more reasonable list of headers

Might need X-Mempool-Auth in the future as well

@nymkappa
Copy link
Member Author

nymkappa commented Feb 4, 2025

Updated, feel free to just suggest the changes directly on github if you want to tweak those

@nymkappa nymkappa changed the title enable cors headers * fix cors Feb 5, 2025
Copy link
Member

@wiz wiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks totally safe and couldn't possibly break anything (tm) ACK

@wiz wiz merged commit 8b90500 into master Mar 29, 2025
26 of 27 checks passed
@wiz wiz deleted the nymkappa/cors branch March 29, 2025 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants