1212# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313# See the License for the specific language governing permissions and
1414
15- # Env says we're using SSL
15+ # Env says we're using SSL
1616if [ -n " ${ENABLE_SSL+1} " ] && [ " ${ENABLE_SSL,,} " = " true" ]; then
1717 echo " Enabling SSL..."
1818 cp /usr/src/proxy_ssl.conf /etc/nginx/conf.d/proxy.conf
2121 cp /usr/src/proxy_nossl.conf /etc/nginx/conf.d/proxy.conf
2222fi
2323
24- # If an htpasswd file is provided, download and configure nginx
24+ # If an htpasswd file is provided, download and configure nginx
2525if [ -n " ${ENABLE_BASIC_AUTH+1} " ] && [ " ${ENABLE_BASIC_AUTH,,} " = " true" ]; then
2626 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
2828fi
2929
3030# 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
5050fi
5151
5252# 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
5454
5555# Tell nginx if you want to block or allow iframing of pages and what domain name is allowed to iframe your content
5656if [ -n " ${XFRAME_OPTION+1} " ]; then
5757 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
5959else
6060 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
6262fi
6363
6464
0 commit comments