Commit f8d91ca7 authored by nanahira's avatar nanahira

add sni support

parent 4f685863
Pipeline #16736 passed with stages
in 4 minutes
...@@ -19,6 +19,7 @@ Site variables should be followed after `SITE_<domain>_`. ...@@ -19,6 +19,7 @@ Site variables should be followed after `SITE_<domain>_`.
- `NO_VERIFY_CERTS` - `NO_VERIFY_CERTS`
- `NO_BUFFER` Add `proxy_buffering off;` to nginx conf. - `NO_BUFFER` Add `proxy_buffering off;` to nginx conf.
- `NO_CACHE` Add `proxy_cache off;` to nginx conf. - `NO_CACHE` Add `proxy_cache off;` to nginx conf.
- `SNI` Add `proxy_ssl_server_name on;` to nginx conf.
- `TIMEOUT` in seconds. - `TIMEOUT` in seconds.
- `SERVER_EXTRA` Extra entry in `server`. - `SERVER_EXTRA` Extra entry in `server`.
- `LOCATION_EXTRA` Extra entry in `location`. - `LOCATION_EXTRA` Extra entry in `location`.
......
...@@ -23,6 +23,7 @@ export interface SiteRenderData { ...@@ -23,6 +23,7 @@ export interface SiteRenderData {
disableTop?: boolean; disableTop?: boolean;
noVerifyCerts?: boolean; noVerifyCerts?: boolean;
noBuffer?: boolean; noBuffer?: boolean;
sni?: boolean;
noCache?: boolean; noCache?: boolean;
upstream: string; upstream: string;
timeout?: number; timeout?: number;
...@@ -72,6 +73,7 @@ function getSiteData( ...@@ -72,6 +73,7 @@ function getSiteData(
disableTop: parser.getBoolean('DISABLE_TOP'), disableTop: parser.getBoolean('DISABLE_TOP'),
noVerifyCerts: parser.getBoolean('NO_VERIFY_CERTS'), noVerifyCerts: parser.getBoolean('NO_VERIFY_CERTS'),
noBuffer: parser.getBoolean('NO_BUFFER'), noBuffer: parser.getBoolean('NO_BUFFER'),
sni: parser.getBoolean('SNI'),
noCache: parser.getBoolean('NO_CACHE'), noCache: parser.getBoolean('NO_CACHE'),
upstream: input[`SITE_${domain}`], upstream: input[`SITE_${domain}`],
timeout: parser.getNumber('TIMEOUT'), timeout: parser.getNumber('TIMEOUT'),
......
...@@ -219,6 +219,9 @@ http { ...@@ -219,6 +219,9 @@ http {
{{#noBuffer}} {{#noBuffer}}
proxy_buffering off; proxy_buffering off;
{{/noBuffer}} {{/noBuffer}}
{{#sni}}
proxy_ssl_server_name on;
{{/sni}}
{{#noCache}} {{#noCache}}
proxy_cache off; proxy_cache off;
{{/noCache}} {{/noCache}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment