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

Strict slashes settings is no longer works in connexion 3.x #1978

Open
hashannalaka opened this issue Sep 24, 2024 · 0 comments
Open

Strict slashes settings is no longer works in connexion 3.x #1978

hashannalaka opened this issue Sep 24, 2024 · 0 comments

Comments

@hashannalaka
Copy link

Description

Connexion 2 accepts both the URLS with or without trailing slashes when the connexion_app.app.url_map.strict_slashes = False. But this behaviour is no longer works in Connexion 3

Expected behaviour

It should accept both the URLS with or without trailing slashes when user call the API.

Actual behaviour

With the connexion upgrade to 3.0 it works bit differently. The request with backslash is responded with a 307 redirect response with the URL without trailing backslash in the response location header.

Example

  • Without backslash

Screenshot from 2024-09-24 09-04-15

  • With backslash

Screenshot from 2024-09-24 09-05-03

Response headers

Response Headers
date: Tue, 24 Sep 2024 03:40:33 GMT
server: uvicorn
content-length: 0
location: http://0.0.0.0:5001/test_endpoint
Response Body

Steps to reproduce

I have created a example application to reproduce the issue.

URL → https://github.com/hashannalaka/connexion-test.git

Additional info:

Output of the commands:

  • python --version : Python 3.11.2
  • pip show connexion | grep "^Version\:" : Version: 3.0.0

Is this the expected behavior in Connexion 3? I would appreciate any help regarding this.

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

1 participant