Skip to content

Over-aggressive middleware to check versioned base URL #737

@CasperWA

Description

@CasperWA

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority/highIssue or PR with a consensus of high priorityserverIssues pertaining to the example server implementation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions