conveyal / analysis-backend

Server component of Conveyal Analysis
http://conveyal.com/analysis
MIT License
23 stars 12 forks source link

Add CORS response headers #224

Closed trevorgerhardt closed 5 years ago

trevorgerhardt commented 5 years ago

This is necessary for the new way the front end is deployed. The front end and back end are no longer distributed from the same server so the "Origin" is different, requiring the API requests to be "Cross-Origin-Resource-Sharing" requests.

I was attempting to get around it by proxying requests through a node server deployed the same way as the front end. But it turns out the new service has a size limit on requests (reasonable) and recommends large files uploads to be done through signed URLS.

With the upcoming changes planned for resources I plan to make changes that would use that style (large file uploads going directly to S3).

codecov-io commented 5 years ago

Codecov Report

Merging #224 into dev will increase coverage by 0.05%. The diff coverage is 42.85%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #224      +/-   ##
============================================
+ Coverage     23.05%   23.11%   +0.05%     
  Complexity      103      103              
============================================
  Files            62       62              
  Lines          2407     2414       +7     
  Branches        218      219       +1     
============================================
+ Hits            555      558       +3     
- Misses         1819     1822       +3     
- Partials         33       34       +1
Impacted Files Coverage Δ Complexity Δ
...rc/main/java/com/conveyal/taui/AnalysisServer.java 45.87% <42.85%> (-0.21%) 5 <0> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 483f82d...505978f. Read the comment docs.