Skip to content

Commit

Permalink
Update apps/civicsignalblog/payload.config.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Clemence Kyara <[email protected]>
  • Loading branch information
m453h and kilemensi authored Oct 23, 2024
1 parent 999107d commit 412826e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/civicsignalblog/payload.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,10 @@ export default buildConfig({
express: {
postMiddleware: [
(_req: Request, res: Response, next: NextFunction) => {
const existingHeaders =
res.getHeader("Access-Control-Allow-Headers") || "";
const additionalHeaders = customHeaders.join(", ");
const controlHeaders = customHeaders
.concat(res.getHeader("Access-Control-Allow-Headers")
.filter((h) => h)
.join(",");
res.header(
"Access-Control-Allow-Headers",
`${existingHeaders}, ${additionalHeaders}`,
Expand Down

0 comments on commit 412826e

Please sign in to comment.