Skip to content

Commit

Permalink
chore: Fix formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
m453h committed Oct 18, 2024
1 parent 0e6586c commit b2a186c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions apps/civicsignalblog/payload.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Request, Response, NextFunction } from 'express';
import { Request, Response, NextFunction } from "express";
import path from "path";

import { buildConfig } from "payload/config";
Expand Down Expand Up @@ -39,7 +39,7 @@ const cors =
?.map((d) => d.trim())
?.filter(Boolean) ?? [];

const customHeaders: string[] = [ 'x-current-app',];
const customHeaders: string[] = ["x-current-app"];

const csrf =
process?.env?.PAYLOAD_CSRF?.split(",")
Expand Down Expand Up @@ -161,11 +161,12 @@ export default buildConfig({
express: {
postMiddleware: [
(_req: Request, res: Response, next: NextFunction) => {
const existingHeaders = res.getHeader("Access-Control-Allow-Headers") || '';
const additionalHeaders = customHeaders.join(', ');
const existingHeaders =
res.getHeader("Access-Control-Allow-Headers") || "";
const additionalHeaders = customHeaders.join(", ");
res.header(
"Access-Control-Allow-Headers",
`${existingHeaders}, ${additionalHeaders}`
`${existingHeaders}, ${additionalHeaders}`,
);
next();
},
Expand Down

0 comments on commit b2a186c

Please sign in to comment.