Page MenuHomePhabricator

Cross domain api requests mobile beta
Closed, ResolvedPublicBUG REPORT


Cross-Origin Read Blocking (CORB) blocked cross-origin response'wbRepo') is "" while document.location.origin is ""

This came up in product testing and can be worked around by using the non-mobile domain and the useformat parameter.

Would solving this require the use of the origin interceptor in production too, or can this be overcome through configuration on mediawiki's part?

Bildschirmfoto von 2019-04-15 17-06-48.png (1×1 px, 187 KB)

Related Objects

Event Timeline

From the screenshot and my testing looks like the request is blocked by CORS and then the the response is blocked by CORB.

As far as I can read I would expect that maybe the problem will be solved if we sort out the CORS issue. The CORB one seems like it might be an artefact of the CORS blocking given that the response has content-type application/json and this is the first of our requestted content types.

I'm hopeful fixing the CORS is all that's needed. I believe this probably needs to be done with the interceptor.

Leaving breadcrumbs:
Looks like the MobileFront end team have been poking this area not too long ago:

Change 505768 had a related patch set uploaded (by Tarrow; owner: Tarrow):
[wikibase/termbox@master] Remove repoUrl from base url

Looks like using relative origin may be the best solution for this mimics what is being done by MobileFrontend. However this breaks the mock-entry dev setup. Perhaps the solution to this is to have the mock server proxy requests to the right place. Alternative we might end up with custom host code in the prod client that is only needed for the dev setup.

Change 505768 merged by jenkins-bot:
[wikibase/termbox@master] Remove repoUrl from base url