Skip to content

Commit 3798972

Browse files
committed
imp: nginx config
1 parent f7fb85a commit 3798972

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docker-entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
#!/bin/sh
22
set -e
3+
4+
echo "[entrypoint] loading privoxy environment...";
5+
36
privman --init
47

58
if $ADBLOCK_NGINX_ENABLED && [ -n "$ADBLOCK_URLS" ]; then
9+
print "[entrypoint] launching nginx..."
610
envsubst '$NGINX_SERVER_NAME $NGINX_PORT $NGINX_PORT_SSL' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
711
nginx
812
fi

templates/nginx.conf.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ http {
7474
default_type text/css;
7575
add_header X-Content-Type-Options nosniff;
7676
add_header Cache-Control "public, max-age=31536000, immutable";
77+
add_header Access-Control-Allow-Origin "*" always;
7778
try_files $uri $1;
7879
}
7980

@@ -82,6 +83,7 @@ http {
8283
default_type text/css;
8384
add_header X-Content-Type-Options nosniff;
8485
add_header Cache-Control "public, max-age=31536000, immutable";
86+
add_header Access-Control-Allow-Origin "*" always;
8587
rewrite ^/([^/]*?)\.([^/.]+)(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?/ab2p.css$ /$9/$8/$7/$6/$5/$4/$3/$2/$1/ab2p.css last;
8688
}
8789

@@ -91,6 +93,7 @@ http {
9193
default_type text/css;
9294
add_header X-Content-Type-Options nosniff;
9395
add_header Cache-Control "public, max-age=31536000, immutable";
96+
add_header Access-Control-Allow-Origin "*" always;
9497
try_files $uri $1ab2p.css;
9598
}
9699
}

0 commit comments

Comments
 (0)