oda-hub / dispatcher-app

Other
2 stars 2 forks source link

load-frontend-fits-file-uri #708

Closed burnout87 closed 2 months ago

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 62.40%. Comparing base (6e98f24) to head (9faf4bd). Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
cdci_data_analysis/flask_app/app.py 95.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #708 +/- ## ========================================== + Coverage 62.33% 62.40% +0.07% ========================================== Files 50 50 Lines 8982 9002 +20 ========================================== + Hits 5599 5618 +19 - Misses 3383 3384 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dsavchenko commented 2 months ago

So the difference from the existing file upload endpoint is that this basically acts as middleware that appends required headers, but doesn't persist the file itself?

francoismg commented 2 months ago

Well, this approach will work as long as dispatcher and frontend have the same Origin (i.e. served on the same domain. Which is the case in our deployments, the dispatcher is proxied through frontend's webserver at /dispatch-data endpoint.) So there is no need to set any additional header.

Yes and if it were to change it would be easy to check the origin against a list of authorized origins and set the origin in the header response if there's a match