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

Trailing slash redirect strips directories from path #723

Closed
pnicolcev-tulipretail opened this issue Dec 20, 2017 · 1 comment
Closed

Trailing slash redirect strips directories from path #723

pnicolcev-tulipretail opened this issue Dec 20, 2017 · 1 comment

Comments

@pnicolcev-tulipretail
Copy link
Contributor

When a client leaves a trailing slash on the end of an endpoint Hydra redirects with a 307 to, for eg.
Location: /oauth2/token

We deploy Hydra under a directory eg. /hydra and the redirect is missing this from the start of the path.

The URLs in the discovery endpoint are all correct (and stripping the slash from the end of my client resolves the issue).

@aeneasr
Copy link
Member

aeneasr commented Dec 21, 2017

Thank you for your report.

This is caused by httprouter which automatically redirects thinks like domain.com//foo to domain.com/foo and domain.com/foo/ to domain.com/foo. As it does so based on the route name, not the issuer url, there is no clear way to resolve this issue in that specific case.

As all endpoints are properly advertised in the discovery endpoints, this will be a nofix, unless serious concerns arise, or practical ideas on how to resolve it.

@aeneasr aeneasr closed this as completed Dec 21, 2017
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

No branches or pull requests

2 participants