Skip to content

Commit

Permalink
update express ts template
Browse files Browse the repository at this point in the history
  • Loading branch information
JC-Coder committed Jul 6, 2024
1 parent 63939ce commit a7b7074
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/templates/backend/express-ts/v0/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 67,15 @@ app.use(limiter);
//Middleware to allow CORS from frontend
app.use(
cors({
origin: ['https://abeghelp.me', 'https://www.abeghelp.me', 'http://localhost:3000', 'http://localhost:3001'],
origin: '*',
credentials: true,
})
);
//Configure Content Security Policy (CSP)
//prevent Cross-Site Scripting (XSS) attacks by not allowing the loading of content from other domains.
const contentSecurityPolicy = {
directives: {
defaultSrc: ["'self'", 'https://www.abeghelp.me', 'https://abeghelp.me', 'https://api.abeghelp.me'],
defaultSrc: ["'self'"],
scriptSrc: ["'self'"],
styleSrc: ["'self'"],
imgSrc: ["'self'"],
Expand Down

0 comments on commit a7b7074

Please sign in to comment.