Skip to content

Edit nginx/nginx.conf to enable CORS#2580

Merged
ttmc merged 2 commits intobigchaindb:masterfrom
ttmc:fix-nginx-conf-for-cors
Oct 11, 2018
Merged

Edit nginx/nginx.conf to enable CORS#2580
ttmc merged 2 commits intobigchaindb:masterfrom
ttmc:fix-nginx-conf-for-cors

Conversation

@ttmc
Copy link
Copy Markdown
Contributor

@ttmc ttmc commented Oct 10, 2018

@ttmc ttmc self-assigned this Oct 10, 2018
@ttmc ttmc requested review from kremalicious and removed request for kremalicious October 10, 2018 14:20
@ttmc
Copy link
Copy Markdown
Contributor Author

ttmc commented Oct 10, 2018

Before I merge this PR, I will test the change in the testnet.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Oct 10, 2018

Codecov Report

Merging #2580 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2580   +/-   ##
=======================================
  Coverage   93.59%   93.59%           
=======================================
  Files          45       45           
  Lines        2684     2684           
=======================================
  Hits         2512     2512           
  Misses        172      172

@ttmc
Copy link
Copy Markdown
Contributor Author

ttmc commented Oct 11, 2018

I tested this by updating the nginx/nginx.conf file on the testnet and then using the "Get Started" page of beta.bigchaindb.com (based on bigchaindb/site#270). It didn't work.

Then I looked at the nginx.conf template for the web proxy, and noticed this line in the 'OPTIONS' block had more stuff:

add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,app_key,app_id';

So I changed that line in the live testnet, and then the "Get Started" page worked for beta.bigchaindb.com, yay! I will make a commit to update this PR accordingly.

@ttmc ttmc removed the DO NOT MERGE label Oct 11, 2018
@ttmc ttmc merged commit e2b3c78 into bigchaindb:master Oct 11, 2018
@ttmc ttmc deleted the fix-nginx-conf-for-cors branch October 11, 2018 07:53
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