Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
Project Page
Commits
6fdbbc20
Commit
6fdbbc20
authored
3 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
add CSP
parent
990f3f9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app.ts
+13
-1
app.ts
with
13 additions
and
1 deletion
+13
-1
app.ts
+
13
-
1
View file @
6fdbbc20
...
...
@@ -19,7 +19,19 @@ app.set('port', config.app.port)
app
.
set
(
'
views
'
,
__dirname
+
'
/views
'
)
app
.
set
(
'
view engine
'
,
'
pug
'
)
app
.
use
(
helmet
())
app
.
use
(
helmet
.
contentSecurityPolicy
({
useDefaults
:
true
,
directives
:
{
"
font-src
"
:
[
"
'self'
"
,
"
https://use.fontawesome.com
"
],
"
img-src
"
:
[
"
'self'
"
,
"
https://transfer.hft-stuttgart.de
"
],
"
script-src
"
:
[
"
'self'
"
,
"
https://code.jquery.com/jquery-3.3.1.min.js
"
,
"
https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js
"
,
"
https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js
"
],
"
style-src
"
:
[
"
'self'
"
,
"
https://use.fontawesome.com/releases/v5.8.2/css/all.css
"
],
"
frame-src
"
:
[
"
'self'
"
]
},
reportOnly
:
true
,
})
);
app
.
use
(
compression
())
app
.
use
(
morgan
(
'
combined
'
))
app
.
use
(
cookieParser
())
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets