mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) updates from grist-core
This commit is contained in:
@@ -104,7 +104,11 @@ export class DocApiForwarder {
|
||||
url.pathname = removeTrailingSlash(docWorkerUrl.pathname) + url.pathname;
|
||||
|
||||
const headers: {[key: string]: string} = {
|
||||
...getTransitiveHeaders(req),
|
||||
// At this point, we have already checked and trusted the origin of the request.
|
||||
// See FlexServer#addApiMiddleware(). So don't include the "Origin" header.
|
||||
// Including this header also would break features like form submissions,
|
||||
// as the "Host" header is not retrieved when calling getTransitiveHeaders().
|
||||
...getTransitiveHeaders(req, { includeOrigin: false }),
|
||||
'Content-Type': req.get('Content-Type') || 'application/json',
|
||||
};
|
||||
for (const key of ['X-Sort', 'X-Limit']) {
|
||||
|
||||
Reference in New Issue
Block a user