Skip to content

Commit cbe5538

Browse files
committedOct 13, 2019
Adicionado exemplo nginx
1 parent d2572fa commit cbe5538

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
 

‎exemplos/apache/virtualhost.conf

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
ErrorLog ${APACHE_LOG_DIR}/error.log
66
CustomLog ${APACHE_LOG_DIR}/access.log combined
77

8+
#################################
9+
# CSP - Content Security Policy
10+
#################################
11+
812
# Só permite carregamento de recursos do mesmo domínio
913
#Header set Content-Security-Policy "default-src 'self';"
1014

‎exemplos/nginx/exemplo.com

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
server {
2+
listen 80 default_server;
3+
listen [::]:80 default_server;
4+
5+
root /var/www/html;
6+
index index.html index.htm index.nginx-debian.html;
7+
8+
server_name _;
9+
10+
location / {
11+
try_files $uri $uri/ =404;
12+
}
13+
14+
#################################
15+
# CSP - Content Security Policy
16+
#################################
17+
18+
# Só permite carregamento de recursos do mesmo domínio
19+
#add_header Content-Security-Policy "default-src 'self';"
20+
21+
# Só permite carregamento de recursos do mesmo domínio ou da cnd da cloudflare
22+
add_header Content-Security-Policy "default-src 'self' https://cdnjs.cloudflare.com;"
23+
}

0 commit comments

Comments
 (0)
Please sign in to comment.