mirror of
https://github.com/moparisthebest/mail
synced 2025-02-16 15:10:10 -05:00
aded csp to dev server
This commit is contained in:
parent
8115cd1c4a
commit
5fe698b26a
10
.htaccess
10
.htaccess
@ -1,10 +0,0 @@
|
||||
<filesMatch ".(html|htm|js|css|png)$">
|
||||
FileETag None
|
||||
<ifModule mod_headers.c>
|
||||
Header unset ETag
|
||||
Header set Cache-Control "max-age=0, no-cache, must-revalidate"
|
||||
Header set Pragma "no-cache"
|
||||
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
|
||||
Header set Content-Security-Policy "default-src *; script-src 'self'; object-src 'none'; style-src 'self'"
|
||||
</ifModule>
|
||||
</filesMatch>
|
@ -18,9 +18,13 @@ if (process.argv[2]) {
|
||||
|
||||
// Server setup
|
||||
app = express();
|
||||
app.configure(function(){
|
||||
app.use(app.router);
|
||||
app.configure(function(){
|
||||
app.use(express['static'](__dirname));
|
||||
app.use(function(req, res, next) {
|
||||
res.set('Content-Security-Policy', "script-src 'self' 'unsafe-eval'; object-src 'none'; style-src 'self' 'unsafe-inline'");
|
||||
return next();
|
||||
});
|
||||
app.use(express['static'](__dirname + '/src'));
|
||||
});
|
||||
|
||||
// start server
|
||||
|
Loading…
Reference in New Issue
Block a user