diff --git a/public/src/modules/api.js b/public/src/modules/api.js index f510586549..95d5d35a1e 100644 --- a/public/src/modules/api.js +++ b/public/src/modules/api.js @@ -61,6 +61,11 @@ async function xhr(options) { const res = await fetch(url, options); const { headers } = res; + + if (headers.get('x-redirect')) { + return xhr({ url: headers.get('x-redirect'), ...options }); + } + const contentType = headers.get('content-type'); const isJSON = contentType && contentType.startsWith('application/json');