Commit 010149e6 authored by Brian Long's avatar Brian Long
Browse files

added platform config

parent f1df9c32
Loading
Loading
Loading
Loading
+4 −0
Changes for nginx-ingress/entrypoint.sh: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
#!/bin/sh

if [[ $ACS_PLATFORM_URL ]]; then
  sed -i s%http:\/\/platform:8080%"$REPO_URL"%g /etc/nginx/nginx.conf
fi

if [[ $ACCESS_LOG ]]; then
  sed -i s%\#ENV_ACCESS_LOG%"access_log $ACCESS_LOG;"%g /etc/nginx/nginx.conf
fi
+23 −0
Changes for nginx-ingress/nginx.conf: 23 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -24,5 +24,28 @@ http {
        proxy_set_header X-Real-IP       $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass_header Set-Cookie;
        
        # Protect access to SOLR APIs
        location ~ ^(/.*/service/api/solr/.*)$ {return 403;}
        location ~ ^(/.*/s/api/solr/.*)$ {return 403;}
        location ~ ^(/.*/wcservice/api/solr/.*)$ {return 403;}
        location ~ ^(/.*/wcs/api/solr/.*)$ {return 403;}

        location ~ ^(/.*/proxy/alfresco/api/solr/.*)$ {return 403 ;}
        location ~ ^(/.*/-default-/proxy/alfresco/api/.*)$ {return 403;}
        
        # Protect access to Prometheus endpoint
        location ~ ^(/.*/s/prometheus)$ {return 403;}
        
        location / {
            proxy_pass http://platform:8080;
        }

        location /alfresco/ {
            proxy_pass http://platform:8080;

            # If using external proxy / load balancer (for initial redirect if no trailing slash)
            absolute_redirect off;
        }
    }
}