put/create

This commit is contained in:
Alex Holliday committed 2026-01-30 19:41:41 +00:00
1 parent f538f61464
commit 67da6c61cf
9 files changed
+210 -100

No files matched your search

+5 -3
View File
@@ -28,18 +28,20 @@ export const createApp = ({
}) => {
const allowedOrigin = envSettings.clientHost;
const app = express();
app.use(generalApiLimiter);
// Static files
app.use(express.static(frontendPath));
app.use(
cors({
origin: allowedOrigin,
methods: "GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS",
allowedHeaders: ["Content-Type", "Authorization"],
allowedHeaders: ["Content-Type", "Authorization", "Accept-Language"],
credentials: true,
})
);
app.use(express.static(frontendPath));
app.use(express.json());
app.use(cookieParser());