Skip to content

Commit

Permalink
Merge pull request #2149 from florkbr/add-back-proxy-headers
Browse files Browse the repository at this point in the history
fix(config-utils): 403 cors - headers and origin fix for stage env
  • Loading branch information
florkbr authored Jan 16, 2025
2 parents 94ab670 + 7e28f6a commit e162fff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/config-utils/src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ const proxy = ({
},
...(agent && {
agent,
headers: {
// Staging Akamai CORS gives 403s for non-GET requests from non-origin hosts
Host: target.replace('https://', ''),
// Origin format is protocol://hostname:port only, remove any trailing slash
Origin: target.replace(/\/$/, ''),
},
}),
});
}
Expand Down

0 comments on commit e162fff

Please sign in to comment.