Skip to content

Commit

Permalink
Update http.conf.template
Browse files Browse the repository at this point in the history
  • Loading branch information
thebalaa authored May 16, 2024
1 parent b9fda97 commit fef2545
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/gateway/http.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ server {
server_name "~^(?<app>.+?)?\.(?<subdomain>.+?)?\.(?<domain>.+)\.(?<tld>.+)$" "~^(?<subdomain>.+)\.(?<domain>.+)\.(?<tld>.+)$" "~^(?<domain>.+)\.(?<tld>.+)$";
#access_log /var/log/nginx/host.access.log main;

set $target http://$subdomain-$domain-$tld;

if ($app != '') {
set $target http://$app-$subdomain-$domain-$tld;
}

set $target http://$subdomain-$domain-$tld;
if ($subdomain = '') {
set $target http://$domain-$tld;
}

location /test {
add_header Content-Type text/plain;
return 200 "target: $target \napp: $app - subdomain: $subdomain - domain: $domain.$tld";
Expand Down

0 comments on commit fef2545

Please sign in to comment.