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

add cors headers to find interface #252

Merged
merged 4 commits into from
Mar 9, 2022
Merged

add cors headers to find interface #252

merged 4 commits into from
Mar 9, 2022

Conversation

willscott
Copy link
Member

as you can see at https://cid.contact currently, query requests fail to load the json due to lack of cors cross-domain.

@codecov-commenter
Copy link

Codecov Report

Merging #252 (ad23756) into main (f44f8ea) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #252      +/-   ##
==========================================
+ Coverage   29.29%   29.34%   +0.04%     
==========================================
  Files          84       84              
  Lines       11851    11859       +8     
==========================================
+ Hits         3472     3480       +8     
  Misses       7880     7880              
  Partials      499      499              
Impacted Files Coverage Δ
server/finder/http/server.go 87.50% <100.00%> (+2.50%) ⬆️

Copy link
Collaborator

@gammazero gammazero left a comment

Choose a reason for hiding this comment

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

In the future should we consider making the allowed origins configurable?

@willscott
Copy link
Member Author

i think it's fine to leave that to an nginx layer rather than trying to have it be the indexer manage that complexity. i think the default is that anyone who can access the endpoint should be able to consume find requests browser or otherwise

@willscott willscott merged commit 1f9d48b into main Mar 9, 2022
@willscott willscott deleted the cors branch March 9, 2022 18:07
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.

3 participants