The endpoint for fetching the user profile returns a 405 Method Not Allowed when hit with OPTIONS.
Since OPTIONS is used for pre-flight verification for CORS, this makes the endpoint unreachable from the browser.
The endpoint for fetching the user profile returns a 405 Method Not Allowed when hit with OPTIONS.
Since OPTIONS is used for pre-flight verification for CORS, this makes the endpoint unreachable from the browser.
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Handle CORS preflight request and prevent anon users from unsafe methods | mediawiki/core | master | +1 K -97 |
I'm kicking this over to PET so we can review it for the correct routing. It's a bug in our OAuth implementation, so we could manage it either in Clinic Duty, Green Team, or Contractors Workboard. In any event, this is a real problem for the API Gateway.
I also wonder if there's a mechanism to handle OPTIONS requests automatically in our REST Router code. If not, maybe we should add it. If so, it'd be interesting to find out why it doesn't apply for this endpoint.
Will be fixed when https://gerrit.wikimedia.org/r/c/mediawiki/core/+/621900 is landed.
Change 621900 had a related patch set uploaded (by Daniel Kinzler; owner: Dbarratt):
[mediawiki/core@master] Handle CORS preflight request and prevent anon users from unsafe methods
Change 621900 merged by BPirkle:
[mediawiki/core@master] Handle CORS preflight request and prevent anon users from unsafe methods