Skip to content

Commit

Permalink
Merge pull request #407 from efdali/master
Browse files Browse the repository at this point in the history
fix: forward-compatibility adaptation for request headers
  • Loading branch information
mehmetsefabalik committed Oct 23, 2023
2 parents e858095 + 1796ece commit 91bbb58
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@puzzle-js/core",
"version": "3.62.1",
"version": "3.62.2",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"logo": "https://image.ibb.co/jM29on/puzzlelogo.png",
Expand Down
8 changes: 7 additions & 1 deletion src/fragment.ts
Expand Up @@ -137,7 +137,13 @@ export class FragmentBFF extends Fragment {
* @returns {*}
*/
private clearRequest(req: express.Request) {
const clearedReq = Object.assign({}, req);
const clearedReq = Object.assign(
{
headers: req.headers
},
req
);

if (req.query) {
delete clearedReq.query[RENDER_MODE_QUERY_NAME];
delete clearedReq.query[PREVIEW_PARTIAL_QUERY_NAME];
Expand Down

0 comments on commit 91bbb58

Please sign in to comment.