|
50 | 50 | # HSTS for 2 years, including subdomains |
51 | 51 | add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; |
52 | 52 | add_header Access-Control-Allow-Origin "*" always; |
| 53 | + add_header Access-Control-Allow-Methods "GET, OPTIONS" always; |
53 | 54 |
|
54 | 55 | #root = --webDir parameter value |
55 | 56 | root /usr/local/etc/adblock2privoxy/css; |
|
66 | 67 | location ~ ^/@blackhole { |
67 | 68 | default_type text/html; |
68 | 69 | add_header Content-Security-Policy "default-src 'none'; style-src 'self';"; |
| 70 | + add_header Access-Control-Allow-Origin "*" always; |
69 | 71 | return 200 "<!DOCTYPE html>\n<html>\n<head>\n<meta charset='utf-8'>\n</head>\n<body>\n<p><a href=\"https://github.com/essandess/adblock2privoxy\">adblock2privoxy</a> blackhole 🕳</p>\n</body>\n</html>\n"; |
70 | 72 | # rewrite ^ /default.html break; |
71 | 73 | } |
|
75 | 77 | default_type text/css; |
76 | 78 | add_header X-Content-Type-Options nosniff; |
77 | 79 | add_header Cache-Control "public, max-age=31536000, immutable"; |
| 80 | + add_header Access-Control-Allow-Origin "*" always; |
78 | 81 | try_files $uri $1; |
79 | 82 | } |
80 | 83 |
|
|
83 | 86 | default_type text/css; |
84 | 87 | add_header X-Content-Type-Options nosniff; |
85 | 88 | add_header Cache-Control "public, max-age=31536000, immutable"; |
| 89 | + add_header Access-Control-Allow-Origin "*" always; |
86 | 90 | rewrite ^/([^/]*?)\.([^/.]+)(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?/ab2p.css$ /$9/$8/$7/$6/$5/$4/$3/$2/$1/ab2p.css last; |
87 | 91 | } |
88 | 92 |
|
|
92 | 96 | default_type text/css; |
93 | 97 | add_header X-Content-Type-Options nosniff; |
94 | 98 | add_header Cache-Control "public, max-age=31536000, immutable"; |
| 99 | + add_header Access-Control-Allow-Origin "*" always; |
95 | 100 | try_files $uri $1ab2p.css; |
96 | 101 | } |
97 | 102 | } |
|
0 commit comments