nitter: nginx format config and fix header
This commit is contained in:
parent
57a47598a0
commit
87b9b48d7a
roles/nitter
|
@ -66,7 +66,12 @@
|
|||
- name: nitter
|
||||
docker_container:
|
||||
name: nitter
|
||||
# https://github.com/PrivacyDevel/nitter
|
||||
# Create guest_accounts.jsonl with: https://github.com/PrivacyDevel/nitter/blob/master/twitter_oauth.sh
|
||||
# Mount to: /src/guest_accounts.json
|
||||
#image: ghcr.io/privacydevel/nitter:master
|
||||
image: zedeus/nitter:latest
|
||||
image_name_mismatch: recreate
|
||||
restart_policy: "unless-stopped"
|
||||
auto_remove: false
|
||||
detach: true
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
server {
|
||||
listen 443 ssl http2;
|
||||
listen 443 ssl;
|
||||
{% if inventory_hostname in wg_clients -%}
|
||||
listen {{ wg_clients[inventory_hostname].ip }}:443 ssl http2;
|
||||
listen {{ wg_clients[inventory_hostname].ip }}:443 ssl;
|
||||
{% endif -%}
|
||||
|
||||
include listen-proxy-protocol.conf;
|
||||
|
@ -15,17 +15,17 @@ server {
|
|||
|
||||
# Security Headers
|
||||
# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||
add_header Content-Security-Policy "default-src 'none'; script-src 'self' 'unsafe-inline'; img-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; object-src 'none'; media-src 'self' blob:; worker-src 'self' blob:; base-uri 'self'; form-action 'self'; frame-ancestors 'self'; connect-src 'self' https://*.twimg.com; manifest-src 'self'";
|
||||
add_header Content-Security-Policy "default-src 'none'; script-src 'self' 'unsafe-inline'; img-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; object-src 'none'; media-src 'self' blob: video.twimg.com; worker-src 'self' blob:; base-uri 'self'; form-action 'self'; frame-ancestors 'self'; connect-src 'self' https://*.twimg.com; manifest-src 'self'";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-Frame-Options DENY;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
|
||||
location / {
|
||||
proxy_pass http://{{ bridgewithdns.nitter }}:{{ nitter_port }};
|
||||
proxy_pass http://{{ bridgewithdns.nitter }}:{{ nitter_port }};
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
add_header Content-Type text/plain;
|
||||
return 200 "User-agent: *\nDisallow: /\n";
|
||||
add_header Content-Type text/plain;
|
||||
return 200 "User-agent: *\nDisallow: /\n";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue