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

Cloudflare page will always get 405 error for non-GET method #787

Closed
DanSnow opened this issue Dec 28, 2022 · 0 comments · Fixed by #968
Closed

Cloudflare page will always get 405 error for non-GET method #787

DanSnow opened this issue Dec 28, 2022 · 0 comments · Fixed by #968

Comments

@DanSnow
Copy link
Contributor

DanSnow commented Dec 28, 2022

Environment

Nitro: v1.0.0
Node: v16.18.1

Reproduction

repo: https://github.com/DanSnow/nitro-bug
Cloudflare Page: https://nitro-bug.pages.dev

  1. create an API event handler
  2. use POST request to the event handler
  3. will get 405 method not allow error

Describe the bug

I think it's because here only test 404 error, but Cloudflare will respond 405 if the method is not GET here
https://github.com/unjs/nitro/blob/main/src/runtime/entries/cloudflare-pages.ts#L25

Additional context

No response

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant