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

Over-aggressive middleware to check versioned base URL #737

Closed
CasperWA opened this issue Mar 9, 2021 · 2 comments · Fixed by #752
Closed

Over-aggressive middleware to check versioned base URL #737

CasperWA opened this issue Mar 9, 2021 · 2 comments · Fixed by #752
Assignees
Labels
bug Something isn't working priority/high Issue or PR with a consensus of high priority server Issues pertaining to the example server implementation

Comments

@CasperWA
Copy link
Member

CasperWA commented Mar 9, 2021

Also, I've added a fix to one issue I found locally already, namely that if trailing slashes (/) are used for the root_path, then it was used wrongly.

Not sure if this is related, but I recently noticed that http://localhost:5000/v1 returns with a wrong version error on the reference server now (i.e. it doesn't redirect to the landing page)

Originally posted by @ml-evs in #663 (comment)

I confirm this is the case. The exception message: optimade.server.exceptions.VersionNotSupported: The parsed versioned base URL '/v1' from http://localhost:5000/v1 is not supported by this implementation. Supported versioned base URLs are: /v1, /v1.0, /v1.0.1.

@CasperWA CasperWA added bug Something isn't working priority/high Issue or PR with a consensus of high priority server Issues pertaining to the example server implementation labels Mar 9, 2021
@CasperWA
Copy link
Member Author

CasperWA commented Mar 9, 2021

Note, this doesn't seem to be the case for the server deployed on heroku: https://optimade.herokuapp.com/v1/

@CasperWA
Copy link
Member Author

CasperWA commented Mar 9, 2021

This is same ball park as #520, but may not be related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority/high Issue or PR with a consensus of high priority server Issues pertaining to the example server implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant