Serve webapi CORS header from Tornado instead of nginx

RESOLVED FIXED

Status

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: imadueme, Assigned: imadueme)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Having the API handle CORS gives us more fine grain control.
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 3

2 years ago
mozreview-review
Comment on attachment 8844536 [details]
autoland-webapi: add cors headers to public api paths from config option (bug 1345163).

https://reviewboard.mozilla.org/r/117930/#review120000

LGTM

::: autoland/webapi/autolandweb/routes.py:12
(Diff revision 2)
>  
>  from autolandweb.dockerflow import DOCKERFLOW_ROUTES
>  from autolandweb.series import get_series_status
>  
>  
> -class MainHandler(tornado.web.RequestHandler):
> +class PublicApiHandler(tornado.web.RequestHandler):

I think we'll probably have to setup the preflight "OPTIONS" response in the base handler, but it's not needed yet since we only have get. Just putting this here so we remember.
Attachment #8844536 - Flags: review?(smacleod) → review+

Comment 4

2 years ago
Pushed by smacleod@mozilla.com:
https://hg.mozilla.org/automation/conduit/rev/a15151d3b573
autoland-webapi: add cors headers to public api paths from config option . r=smacleod
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.