Skip to content

Commit

Permalink
SVCPLAN-6491: Edit configs for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
PhongT16 committed Nov 18, 2024
1 parent a3c2872 commit f6875a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN /usr/local/openresty/luajit/bin/luarocks install lua-resty-session

# Copy custom nginx.conf
COPY ./nginx.conf.template /usr/local/openresty/nginx/conf/
#COPY /etc/letsencrypt/live/ /etc/letsencrypt/live/

CMD ["/bin/sh", "-c", "envsubst '${CLIENT_ID} ${CLIENT_SECRET} ${PAT} ${PROXY_FQDN} ${TARGET_FQDN} ${DNS_RESOLVER}' < /usr/local/openresty/nginx/conf/nginx.conf.template > /usr/local/openresty/nginx/conf/nginx.conf && openresty -g 'daemon off;'"]

4 changes: 2 additions & 2 deletions nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ http {
sub_filter_types text/html application/json text/plain;

# Replaces every occurence of wiki.ncsa.illinois.edu with wiki-p-dev.ncsa.illinois.edu
sub_filter 'https://wiki.ncsa.illinois.edu/' 'https://wiki-p-dev.ncsa.illinois.edu/';
sub_filter 'https://${TARGET_FQDN}/' 'https://{PROXY_FQDN}/';

# Turn off matching only once
sub_filter_once off;
Expand All @@ -91,7 +91,7 @@ http {
proxy_set_header Referer https://${TARGET_FQDN};
proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Authorization "Bearer ${PAT}"; # Your PAT
proxy_set_header Authorization "Bearer ${PAT}"; # Your PAT
proxy_pass_header Set-Cookie;
proxy_pass https://${TARGET_FQDN};
}
Expand Down

0 comments on commit f6875a5

Please sign in to comment.