Skip to content

Commit 92c8236

Browse files
committed
use CSP in sample
1 parent fdaa09c commit 92c8236

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sample/server.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ var express = require('express');
1111
var app = express();
1212

1313
var static = express.static(path.join(__dirname, 'public'));
14+
app.use(function (req, res, next) {
15+
res.set('Content-Security-Policy', "default-src 'self'");
16+
next();
17+
});
1418
app.use(static);
1519

1620
app.get("/oidc-client.js", function(req, res){

0 commit comments

Comments
 (0)