denoland / deploy_feedback

For reporting issues with Deno Deploy
https://deno.com/deploy
74 stars 5 forks source link

[Bug]: Cannot send secure cookie over unencrypted connection. #521

Closed yorinasub17 closed 1 year ago

yorinasub17 commented 1 year ago

Problem description

I'm getting the following TypeError from deno deploy when trying to set a secure cookie via the oak framework:

error: TypeError: Cannot send secure cookie over unencrypted connection.
    at SecureCookieMap.set (https://deno.land/std@0.200.0/http/cookie_map.ts:742:13)
    at file:///src/main.ts:7:21
    at dispatch (https://deno.land/x/oak@v12.6.1/middleware.ts:80:13)
    at composedMiddleware (https://deno.land/x/oak@v12.6.1/middleware.ts:83:12)
    at Application.#handleRequest (https://deno.land/x/oak@v12.6.1/application.ts:470:32)
    at Application.listen (https://deno.land/x/oak@v12.6.1/application.ts:656:28)
    at eventLoopTick (ext:core/01_core.js:183:11)
    at async file:///src/main.ts:15:1

This doesn't make sense to me since the entrypoint URL on deno deploy is a secure connection.

A minimal reproducible example is available at https://github.com/yorinasub17/deno-deploy-cookie-issue (deployed as clear-cow-34).

Steps to reproduce

  1. Deploy https://github.com/yorinasub17/deno-deploy-cookie-issue
  2. Visit home route

Expected behavior

Expect success page with 204 status, without error.

Environment

No response

Possible solution

No response

Additional context

No response

yorinasub17 commented 1 year ago

Gah this is an issue with oak, not deno deploy. Will close and reopen in right place. Apologies for the toil!