File tree Expand file tree Collapse file tree 1 file changed +34
-1
lines changed Expand file tree Collapse file tree 1 file changed +34
-1
lines changed Original file line number Diff line number Diff line change 3
3
proxy_set_header X-Forwarded-Scheme $scheme;
4
4
proxy_set_header X-Forwarded-Proto $scheme;
5
5
proxy_set_header X-Forwarded-For $remote_addr;
6
+ proxy_set_header X-Real-IP $remote_addr;
6
7
proxy_pass {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }};
8
+
9
+ {% if access_list_id > 0 %}
10
+ {% if access_list.items.length > 0 %}
11
+ # Authorization
12
+ auth_basic "Authorization required";
13
+ auth_basic_user_file /data/access/{{ access_list_id }};
14
+
15
+ {{ access_list.passauth }}
16
+ {% endif %}
17
+
18
+ # Access Rules
19
+ {% for client in access_list.clients %}
20
+ {{- client.rule -}};
21
+ {% endfor %}deny all;
22
+
23
+ # Access checks must...
24
+ {% if access_list.satisfy %}
25
+ {{ access_list.satisfy }};
26
+ {% endif %}
27
+
28
+ {% endif %}
29
+
30
+
31
+ {% include "_forced_ssl.conf" %}
32
+ {% include "_hsts.conf" %}
33
+
34
+ {% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
35
+ proxy_set_header Upgrade $http_upgrade;
36
+ proxy_set_header Connection $http_connection;
37
+ proxy_http_version 1.1;
38
+ {% endif %}
39
+
40
+
7
41
{{ advanced_config }}
8
42
}
9
-
You can’t perform that action at this time.
0 commit comments