menu

Gatsby.js

Fast in every way that matters. Gatsby is a free and open source framework based on React that helps developers build blazing fast websites and apps.

Channels
# All channels
view-forward
# General
view-forward
# I Made This
view-forward
# Meta
view-forward
# Themes
view-forward
Team

Trailing slash issue

February 21, 2020 at 7:54pm

Trailing slash issue

February 21, 2020 at 7:54pm
I am having an issue, (only in production) with trailing slashes. If I am in development or run the build locally it works fine. But in production if I click a link to a page (page name is donate), it shows /donate in the url and loads the page successfully but then if I click refresh or try to go directly to the specified path /donate I get a redirect, the page never loads and times out. The weird thing is, it's not a redirect to /donate/, its a redirect to mydomain.com:8080/donate/. My backend server runs on port 8080 but I cannot figure out why this is getting appended when the slash is missing. I tried installing remove trailing slash plugin and same behavior. Does anyone have any ideas?

February 22, 2020 at 4:18am
Can you share an example repo?
  • reply
  • like