mirror of
https://dev.azure.com/tstanciu94/PhantomMind/_git/Bitip
synced 2025-10-13 01:52:19 +03:00
refactor: disable Content Security Policy in security middleware to allow HTTP access
This commit is contained in:
parent
e309e4f71b
commit
9dddf2fa29
@ -21,19 +21,7 @@ const app = express();
|
|||||||
// Security middleware
|
// Security middleware
|
||||||
app.use(
|
app.use(
|
||||||
helmet({
|
helmet({
|
||||||
contentSecurityPolicy: {
|
contentSecurityPolicy: false, // Disable CSP to allow HTTP access
|
||||||
directives: {
|
|
||||||
defaultSrc: ["'self'"],
|
|
||||||
styleSrc: ["'self'", "'unsafe-inline'", 'https://unpkg.com'],
|
|
||||||
scriptSrc: ["'self'"],
|
|
||||||
imgSrc: ["'self'", 'data:', 'https:'],
|
|
||||||
connectSrc: ["'self'"],
|
|
||||||
fontSrc: ["'self'"],
|
|
||||||
objectSrc: ["'none'"],
|
|
||||||
mediaSrc: ["'self'"],
|
|
||||||
frameSrc: ["'none'"],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
strictTransportSecurity: false, // Disable HSTS to allow HTTP access
|
strictTransportSecurity: false, // Disable HSTS to allow HTTP access
|
||||||
crossOriginOpenerPolicy: false, // Disable COOP to allow HTTP access
|
crossOriginOpenerPolicy: false, // Disable COOP to allow HTTP access
|
||||||
crossOriginResourcePolicy: false, // Disable CORP to allow HTTP access
|
crossOriginResourcePolicy: false, // Disable CORP to allow HTTP access
|
||||||
|
Loading…
x
Reference in New Issue
Block a user