Skip to content

Commit bf8bbed

Browse files
author
Steve Hobbs
committed
Disable contentSecurityPolicy when running app server
1 parent f987ce5 commit bf8bbed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Sample-01/server.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ const app = express();
88
const port = process.env.SERVER_PORT || 3000;
99

1010
app.use(morgan("dev"));
11-
app.use(helmet());
11+
12+
app.use(
13+
helmet({
14+
contentSecurityPolicy: false,
15+
})
16+
);
17+
1218
app.use(express.static(join(__dirname, "build")));
1319

1420
app.listen(port, () => console.log(`Server listening on port ${port}`));

0 commit comments

Comments
 (0)