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

Starlette APP cors setting only permits GET requests #1740

Closed
ptomasula opened this issue Jul 19, 2024 · 0 comments
Closed

Starlette APP cors setting only permits GET requests #1740

ptomasula opened this issue Jul 19, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@ptomasula
Copy link
Contributor

Description
The Starlette app with setting cors=true enables all origins, but only permits requests with the GET method. OPTIONS requests with other methods return a 400 response.

Steps to Reproduce

  1. Initialize an instance of the Starlette APP with config setting server.cors=true
  2. Issue an OPTIONS request for a valid endpoint against the Starlette APP, setting both origin and Access-Control-Request-Method headers. *Note Access-Control-Request-Method should be something other than GET.
  3. Check the server response, which should be a 400 - Disallowed CORS method

Expected behavior
Enabling the server.cors setting should enable common request methods for all origins.

Screenshots/Tracebacks
image

Environment

  • OS: Windows 11
  • Python version: Python 3.11.5
  • pygeoapi version: 0.18.dev0
@ptomasula ptomasula added the bug Something isn't working label Jul 19, 2024
@ptomasula ptomasula mentioned this issue Jul 19, 2024
5 tasks
@tomkralidis tomkralidis added this to the 0.18.0 milestone Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants