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

handleCors's maxAge option has no effect #854

Closed
aaharu opened this issue Aug 8, 2024 · 0 comments · Fixed by #856
Closed

handleCors's maxAge option has no effect #854

aaharu opened this issue Aug 8, 2024 · 0 comments · Fixed by #856
Labels
bug Something isn't working

Comments

@aaharu
Copy link
Member

aaharu commented Aug 8, 2024

Environment

h3 v1 and v2 development.

Reproduction

I changed examples/cors.ts to follows.

    handleCors(event, {
      origin: "*",
      maxAge: "600",
    })

But access-control-max-age header does not respond.

curl -v -X OPTIONS -H "Origin: http://localhost" -H "access-control-request-method: GET" "http://localhost:3000/hello"

# < HTTP/1.1 204 No Content
# < access-control-allow-origin: *
# < Date: Thu, 08 Aug 2024 06:18:21 GMT
# < Connection: keep-alive
# < Keep-Alive: timeout=5

Describe the bug

createMaxAgeHeader does not called.

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
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant