12
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
# See the License for the specific language governing permissions and
14
14
15
- # Env says we're using SSL
15
+ # Env says we're using SSL
16
16
if [ -n " ${ENABLE_SSL+1} " ] && [ " ${ENABLE_SSL,,} " = " true" ]; then
17
17
echo " Enabling SSL..."
18
18
cp /usr/src/proxy_ssl.conf /etc/nginx/conf.d/proxy.conf
21
21
cp /usr/src/proxy_nossl.conf /etc/nginx/conf.d/proxy.conf
22
22
fi
23
23
24
- # If an htpasswd file is provided, download and configure nginx
24
+ # If an htpasswd file is provided, download and configure nginx
25
25
if [ -n " ${ENABLE_BASIC_AUTH+1} " ] && [ " ${ENABLE_BASIC_AUTH,,} " = " true" ]; then
26
26
echo " Enabling basic auth..."
27
- sed -i " s/ #auth_basic/ auth_basic/ g;" /etc/nginx/conf.d/proxy.conf
27
+ sed -i " s; #auth_basic; auth_basic; g;" /etc/nginx/conf.d/proxy.conf
28
28
fi
29
29
30
30
# If the SERVICE_HOST_ENV_NAME and SERVICE_PORT_ENV_NAME vars are provided,
@@ -50,15 +50,15 @@ if [ -n "${SERVICE_PORT_ENV_NAME+1}" ]; then
50
50
fi
51
51
52
52
# Tell nginx the address and port of the service to proxy to
53
- sed -i " s/ {{TARGET_SERVICE}}/ ${TARGET_SERVICE} / g;" /etc/nginx/conf.d/proxy.conf
53
+ sed -i " s; {{TARGET_SERVICE}}; ${TARGET_SERVICE} ; g;" /etc/nginx/conf.d/proxy.conf
54
54
55
55
# Tell nginx if you want to block or allow iframing of pages and what domain name is allowed to iframe your content
56
56
if [ -n " ${XFRAME_OPTION+1} " ]; then
57
57
echo " Applying iframe option..."
58
- sed -i " s/ {{XFRAME_VALUE}}/ ${XFRAME_OPTION} / g;" /etc/nginx/conf.d/proxy.conf
58
+ sed -i " s; {{XFRAME_VALUE}}; ${XFRAME_OPTION} ; g;" /etc/nginx/conf.d/proxy.conf
59
59
else
60
60
echo " Denying iframes..."
61
- sed -i " s/ {{XFRAME_VALUE}}/ DENY/ g;" /etc/nginx/conf.d/proxy.conf
61
+ sed -i " s; {{XFRAME_VALUE}}; DENY; g;" /etc/nginx/conf.d/proxy.conf
62
62
fi
63
63
64
64
0 commit comments