Skip to content

Commit 0f93f46

Browse files
Merge pull request #227 from IABTechLab/sch-UID2-6247-remove-header-logging
sch-UID2-6247 fixed nginx configuration syntax
2 parents e4e6f8d + 5a2abd1 commit 0f93f46

File tree

3 files changed

+46
-18
lines changed

3 files changed

+46
-18
lines changed

examples/cstg/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
FROM nginx:latest
2+
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
23
COPY ./nginx/default.conf.template /etc/nginx/templates/
34
COPY ./html /usr/share/nginx/html
Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
http {
2-
log_format path_status '$request_uri $status $remote_addr';
1+
server {
2+
listen 80;
3+
server_name localhost;
4+
root /usr/share/nginx/html;
35

4-
server {
5-
listen 80;
6-
server_name localhost;
7-
root /usr/share/nginx/html;
8-
9-
access_log /var/log/nginx/access.log path_status;
10-
11-
location / {
12-
sub_filter '{{ UID_JS_SDK_URL }}' '${UID_JS_SDK_URL}';
13-
sub_filter '{{ UID_JS_SDK_NAME }}' '${UID_JS_SDK_NAME}';
14-
sub_filter '{{ UID_BASE_URL }}' '${UID_BASE_URL}';
15-
sub_filter '{{ SERVER_PUBLIC_KEY }}' '${SERVER_PUBLIC_KEY}';
16-
sub_filter '{{ SUBSCRIPTION_ID }}' '${SUBSCRIPTION_ID}';
17-
sub_filter_types *;
18-
sub_filter_once off;
19-
}
6+
location / {
7+
sub_filter '{{ UID_JS_SDK_URL }}' '${UID_JS_SDK_URL}';
8+
sub_filter '{{ UID_JS_SDK_NAME }}' '${UID_JS_SDK_NAME}';
9+
sub_filter '{{ UID_BASE_URL }}' '${UID_BASE_URL}';
10+
sub_filter '{{ SERVER_PUBLIC_KEY }}' '${SERVER_PUBLIC_KEY}';
11+
sub_filter '{{ SUBSCRIPTION_ID }}' '${SUBSCRIPTION_ID}';
12+
sub_filter_types *;
13+
sub_filter_once off;
2014
}
2115
}

examples/cstg/nginx/nginx.conf

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
user nginx;
2+
worker_processes auto;
3+
4+
error_log /var/log/nginx/error.log notice;
5+
pid /run/nginx.pid;
6+
7+
8+
events {
9+
worker_connections 1024;
10+
}
11+
12+
13+
http {
14+
include /etc/nginx/mime.types;
15+
default_type application/octet-stream;
16+
17+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
18+
'$status $body_bytes_sent "$http_referer" '
19+
'"$http_user_agent" "$http_x_forwarded_for"';
20+
21+
log_format path_status '$remote_addr - $remote_user [$time_local] $request $status';
22+
23+
access_log /var/log/nginx/access.log path_status;
24+
25+
sendfile on;
26+
#tcp_nopush on;
27+
28+
keepalive_timeout 65;
29+
30+
#gzip on;
31+
32+
include /etc/nginx/conf.d/*.conf;
33+
}

0 commit comments

Comments
 (0)