Skip to content

Commit

Permalink
Commented debug lines
Browse files Browse the repository at this point in the history
  • Loading branch information
SachinMali committed Mar 22, 2024
1 parent b0e7611 commit 806eccd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dispatcher/src/conf.d/available_vhosts/wknd.vhost
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ Include conf.d/variables/custom.vars
SetEnvIfExpr "req_novary('Access-Control-Request-Method') != '' && %{REQUEST_METHOD} == 'OPTIONS' && req_novary('Origin') != ''" CORSType=preflight CORSProcessing=true CORSTrusted=false
SetEnvIfExpr "req_novary('Origin') -strcmatch 'https://%{HTTP_HOST}*'" CORSType=samedomain CORSProcessing=false CORSTrusted=true
SetEnvIfExpr "req_novary('Origin') -strcmatch 'http://%{HTTP_HOST}*'" CORSType=samedomain CORSProcessing=false CORSTrusted=true
#SetEnvIfExpr "env('origin_host') == env('my_request_host')" CORSType=samedomain CORSProcessing=false CORSTrusted=true


# For requests that require CORS processing, check if the Origin can be trusted
SetEnvIfExpr "%{HTTP_HOST} =~ /(.*)/ " ParsedHost=$1
Expand Down Expand Up @@ -80,10 +78,10 @@ Include conf.d/variables/custom.vars
Header always set Access-Control-Allow-Headers "Origin, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers" "expr=reqenv('CORSTrusted') == 'true'"

# Uncomment while debugging
Header always set Debug-CORSProcessing "true" "expr=reqenv('CORSProcessing') == 'true'"
Header always set Debug-CORSProcessing "false" "expr=reqenv('CORSProcessing') == 'false'"
Header always set Debug-CORSTrusted "false" "expr=reqenv('CORSTrusted') == 'false'"
Header always set Debug-CORSTrusted "true" "expr=reqenv('CORSTrusted') == 'true'"
# Header always set Debug-CORSProcessing "true" "expr=reqenv('CORSProcessing') == 'true'"
# Header always set Debug-CORSProcessing "false" "expr=reqenv('CORSProcessing') == 'false'"
# Header always set Debug-CORSTrusted "false" "expr=reqenv('CORSTrusted') == 'false'"
# Header always set Debug-CORSTrusted "true" "expr=reqenv('CORSTrusted') == 'true'"

# Non-CORS or Not Trusted
Header unset Access-Control-Allow-Credentials "expr=reqenv('CORSProcessing') == 'false' || reqenv('CORSTrusted') == 'false'"
Expand Down

0 comments on commit 806eccd

Please sign in to comment.