Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Traefik routing to include a redirect for trailing slash #1

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

humphd
Copy link

@humphd humphd commented Feb 2, 2022

You almost had this working, but it required an extra bit of middleware. We need to force any request for /v1/rss-bridge to use /v1/rss-bridge/ instead (trailing slash).

I've added a RedirectRegex middleware to the router, which will intercept any request for /v1/rss-bridge and turn it into /v1/rss-bridge/. This will mean that relative URLs like static/style.css will get properly resolved to http://localhost/v1/rss-bridge/static/style.css.

We should really do something similar in a few other services (status service comes to mind). I'll file a follow-up on that.

I'm now able to do:

pnpm services:start rss-bridge

And navigate to http://localhost/v1/rss-bridge

@dbelokon
Copy link
Owner

dbelokon commented Feb 2, 2022

I cannot test it right now because my branch seems to have the problem of mdx that was solved later. I will merge the changes now, rebase my branch, and check that it works

@dbelokon dbelokon merged commit fee74bb into dbelokon:rss-bridge Feb 2, 2022
@cindyorangis
Copy link

You don't know how much I needed this Traefik bit too. Bless you @humphd

@humphd
Copy link
Author

humphd commented Feb 2, 2022

@cindyledev if you're talking about the /docs stuff, I'd do it through nginx, like we do with /portainer and /deploy, see https://github.com/Seneca-CDOT/telescope/blob/master/config/nginx.conf.template#L228-L239

@cindyorangis
Copy link

@cindyledev if you're talking about the /docs stuff, I'd do it through nginx, like we do with /portainer and /deploy, see https://github.com/Seneca-CDOT/telescope/blob/master/config/nginx.conf.template#L228-L239

!@#%%^ time for a new adventure with nginx. All the stuff I touched this week makes me feel like I was thrown into a Hyperbolic Time Chamber. One week on Telescope feels like months 🤣

dbelokon pushed a commit that referenced this pull request Feb 12, 2022
* add  Gitpod doc

* Fix gitpod doc #1
dbelokon pushed a commit that referenced this pull request Mar 9, 2022
fix: correct typo and add missing quotation mark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants