Skip to content

Commit

Permalink
[home] fix redirect issue
Browse files Browse the repository at this point in the history
accessing directly to a page url without trailing "/"
caused docusaurus to redirect (http response 301) to absolute
url of server (!= from proxy) + port 8080 != from proxy 443.
fix this by disabling absolute redirect so only the trailing slash is
added to the url.
  • Loading branch information
Seburan committed Jul 13, 2023
1 parent 0f96bb4 commit ed43100
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions services/home/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
server {
listen ${PORT};
server_name ${HOME_HOST};

# https://stackoverflow.com/questions/62648644/hosting-docusaurus-v2-using-nginx
# prevent docusaurus to create a redirect to Cloud Run Endpoint or port 8080
absolute_redirect off;

location / {
root /usr/share/nginx/html;
}
Expand Down

0 comments on commit ed43100

Please sign in to comment.