The most important part of this configuration is in the if statements.
Its main purpose is to keep the protocol of the requests which come through the load balancer (in case it is http or if it is https).
if ($http_x_forwarded_proto != "https") { rewrite ^/artifactory/webapp/(.*) https://$host/artifactory/webapp/$1 redirect; rewrite ^/$ $scheme://$host/artifactory/webapp/#/home redirect; } if ($http_x_forwarded_proto = "https") { rewrite ^/$ https://$host/artifactory/webapp/#/home redirect; }
Please note that the rewrite rules also specify the full path of the redirection along with keeping the protocol.
The rewrite rule for the docker repository has not changed from the auth generator configuration file.
For this example, we used a v2 api repository.
In this case, requests which have the pattern of '/v2/' will be redirected to the docker repository.