From 9373f2ba3b0d75e6d691d76056815768a44ba9b8 Mon Sep 17 00:00:00 2001 From: gyurix Date: Wed, 14 Dec 2022 08:41:08 +0000 Subject: [PATCH] Removed cross origin header add lines --- scripts/check_certificates.sh | 2 +- scripts/nginx_config_create.sh | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/check_certificates.sh b/scripts/check_certificates.sh index 3bd67f6..2e36614 100755 --- a/scripts/check_certificates.sh +++ b/scripts/check_certificates.sh @@ -117,7 +117,7 @@ if [ "$GENERATE_CERTIFICATE" == "true" ]; then } >> "$file"; DOMAIN_CHECK="curl -s -o /dev/null -w "%{http_code}" http://$DOMAIN"; - if [[ "$(eval $DOMAIN_CHECK)" == "200" || "$(eval $DOMAIN_CHECK)" == "301" ]] ; then + if [[ "$(eval $DOMAIN_CHECK)" != "000" ]]; then letsencrypt_certificates; echo "Started letsencrypt for domain: $DOMAIN first time" else diff --git a/scripts/nginx_config_create.sh b/scripts/nginx_config_create.sh index ff42e7b..ad865c1 100755 --- a/scripts/nginx_config_create.sh +++ b/scripts/nginx_config_create.sh @@ -85,7 +85,6 @@ if [[ "$HTTP_PORT" != "" && "$HTTP_PORT" != "80" ]]; then else echo "location / {" - echo "add_header 'Access-Control-Allow-Origin' '*' always;" if [[ "$ALLOWED_NETWORK" != "" ]]; then ALLOWED_NETWORK_IDX=$(jq -r '.ALLOWED_NETWORK | length' $DOMAIN_SOURCE) @@ -186,7 +185,6 @@ location = /$ERROR_PAGE { echo "return 301 $REDIRECT_HTTPS;" else echo "location / {" - echo "add_header 'Access-Control-Allow-Origin' '*' always;" if [[ "$ALLOWED_NETWORK" != "" ]]; then ALLOWED_NETWORK_IDX=$(jq -r '.ALLOWED_NETWORK | length' $DOMAIN_SOURCE)