Step 4:

ARTIFACTORY: How to Enforce HTTP to HTTPS Redirection in Artifactory for browser access using Nginx and Helm Charts

AuthorFullName__c
Vignesh Surendrababu
articleNumber
000005693
ft:sourceType
Salesforce
FirstPublishedDate
2023-04-27T15:57:08Z
lastModifiedDate
2023-04-27
VersionNumber
1
ֿTo proceed, the server block in the artifactory.conf file on the local machine must be modified to separate the listen addresses for ports 80 and 443. Additionally, a redirect 301 condition to the https endpoint must be included for instances where the Artifactory host is accessed using port 80.

Example:
server {
 listen 80;
 server_name ~(?<repo>.+)\.jfrt-artifactory jfrt-artifactory;
 return 301 https://$host$request_uri;
 }
server {
 listen 443 ssl;
 server_name ~(?<repo>.+)\.jfrt-artifactory jfrt-artifactory;
 if ($http_x_forwarded_proto = '') {
   set $http_x_forwarded_proto  $scheme;
 }