Enable CORS access on DXR

RESOLVED FIXED

Status

Webtools
DXR
RESOLVED FIXED
7 months ago
7 months ago

People

(Reporter: KWierso, Assigned: fubar)

Tracking

Trunk

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 months ago
I'm trying to search DXR using the (undocumented, see bug 1193347) json api, with a URL like https://dxr.mozilla.org/mozilla-central/search?q=file:test_safe_browsing_initial_download.py&redirect=false and setting the Accept header to "application/json".

Doing this, I see the following logged to the console:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://dxr.mozilla.org/mozilla-central/search?q=file:test_safe_browsing_initial_download.py&redirect=false. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Could we enable CORS access? At the moment, this is running on localhost:5000, but eventually I'd want it running on treeherder.mozilla.org.
(Reporter)

Comment 1

7 months ago
Just found https://github.com/mozilla/dxr/issues/527
(Assignee)

Comment 2

7 months ago
Erik, if you have no objections I can set this via the load balancer.
Flags: needinfo?(erik)
Go ahead, Kendall.
Flags: needinfo?(erik)
(Assignee)

Comment 4

7 months ago
Done! Wes, shout if you still have an issue.
Assignee: nobody → klibby
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.