Skip to content

Commit

Permalink
Amend server name to create a repo variable in Nginx config.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaassssiiee committed Dec 21, 2023
1 parent b25114f commit 1cafaa5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
## server configuration
server {
listen 443 ssl http2;
{% if artifactory_docker_registry_subdomain %}
server_name ~(?<repo>.+)\.{{ server_name }};
{% else %}
server_name {{ server_name }};
{% endif %}
if ($http_x_forwarded_proto = '') {
set $http_x_forwarded_proto $scheme;
}
Expand Down Expand Up @@ -47,4 +51,4 @@
proxy_pass http://artifactory-direct;
}
}
}
}

0 comments on commit 1cafaa5

Please sign in to comment.