BIIGLE remote location returns 403 via THREDDS/nginx unless Origin/Referer are stripped #1448
alanmacdonald1
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
Posting this in case it helps anyone using BIIGLE remote locations with files served through nginx from THREDDS, Apache, Tomcat, NAS web servers, or other institutional file servers.
If image URLs open directly in a browser, but BIIGLE shows broken images or
403 Forbidden, this may be relevant.I ran into exactly that issue using BIIGLE remote locations with files served from a THREDDS server behind nginx.
Setup
BIIGLE volume files were hosted at URLs like:
nginx added the expected CORS header:
Access-Control-Allow-Origin: https://biigle.deand direct requests in browser / curl worked.
Problem
Inside BIIGLE, images returned:
403 ForbiddenBut only when loaded cross-site from BIIGLE.
After testing, the difference was that BIIGLE/browser requests include:
Those headers were being proxied upstream to THREDDS, which rejected the request.
Solution
Strip
OriginandRefererin nginx for the BIIGLE public file path, and let nginx handle CORS itself.Result
BIIGLE remote images now load correctly.
In case it helps others
If remote files work directly in browser/curl but fail only inside BIIGLE with
403, check whether your upstream server is rejecting forwardedOriginorRefererheaders.Beta Was this translation helpful? Give feedback.
All reactions