Page MenuHomePhabricator

[Sign-Off] Ensure RESTBase endpoints received by edge caches maps accurately to Proton routes
Closed, ResolvedPublic

Description

The URL/endpoints exposed by RESTBase should map accurately to how the routes will be processed by Proton internally. This is because edge caches will receive URLs of the form /{domain}/v1/page/pdf/ for proton and those need to be rewritten to match what Proton will do internally.

Below is a table of the end-points map

RESTBase URL/endpoint (received on edge)Rewrite for Proton
/{domain}/v1/page/pdf/{title}/{domain}/v1/pdf/{title}/a4
/{domain}/v1/page/pdf/{title}/{format}/{domain}/v1/pdf/{title}/{format}
/{domain}/v1/page/pdf/{title}/{format}/{type}/{domain}/v1/pdf/{title}/{format}/{type}
NOTE: RESTBase will append the format (a4) to the URL if only a title is supplied but support for this is not yet in proton, see: https://gerrit.wikimedia.org/r/c/mediawiki/services/chromium-render/+/933885 (adding support).