Giter Club home page Giter Club logo

Comments (13)

djbobbydrake avatar djbobbydrake commented on August 17, 2024 3

Has anyone solved this issue for koa?

from cookies.

atian25 avatar atian25 commented on August 17, 2024 2

@fengmk2 it seem this still happen in koa

from cookies.

dougwilson avatar dougwilson commented on August 17, 2024 1

This issue, "Allow the developer to send secure cookies no matter what" is already fixed in the version 0.6.0 release. Just set secure: true in your Cookies constructor and then this module will assume the request is secure for setting secure cookie and will not examine the request itself.

from cookies.

jonathanong avatar jonathanong commented on August 17, 2024

sounds good to me, though i think devs need some warning. @dougwilson

from cookies.

dougwilson avatar dougwilson commented on August 17, 2024

Yea. I am πŸ‘ on changing the module to allow people to shoot themselves in the foot by sending a secure cookie over a potentially non-secure connection, because it just adds a lot of complexity to the module otherwise. I believe there is a way to do this is a backwards-compatible way and provide any necessary warnings :)

TL;DR I'm in favor, so it'll get added in soon.

from cookies.

fengmk2 avatar fengmk2 commented on August 17, 2024

Thanks all.
2014-7-30 上午3:45于 "Douglas Christopher Wilson" [email protected]ε†™ι“οΌš

Yea. I am [image: πŸ‘] on changing the module to allow people to shoot
themselves in the foot by sending a secure cookie over a potentially
non-secure connection, because it just adds a lot of complexity to the
module otherwise. I believe there is a way to do this is a
backwards-compatible way and provide any necessary warnings :)

TL;DR I'm in favor, so it'll get added in soon.

β€”
Reply to this email directly or view it on GitHub
#51 (comment).

from cookies.

RHavar avatar RHavar commented on August 17, 2024

What's the status of this? How is everyone else working around this? It's pretty common to use SaaS providers, like heroku to have an unencrypted connection between their load balancer and your app. As well doing SSL termination in nginx and what not.

from cookies.

dougwilson avatar dougwilson commented on August 17, 2024

They are using Express or something else that updates req.protocol based on the reverse proxy.

from cookies.

dougwilson avatar dougwilson commented on August 17, 2024

As a side-note, this issue wasn't assigned to me, so I didn't even remember it existed. That's fixed now.

from cookies.

fengmk2 avatar fengmk2 commented on August 17, 2024

me too …

from cookies.

tiagocpontesp avatar tiagocpontesp commented on August 17, 2024

FYI this isn't working through .set(..., opts), on the latest version.

from cookies.

pecliu avatar pecliu commented on August 17, 2024

FYI this isn't working through .set(..., opts), on the latest version.

Me too. setting secure: true inctx.cookies.set(..., opts) doesn't work, still throw Cannot send secure cookie over unencrypted connection

from cookies.

dougwilson avatar dougwilson commented on August 17, 2024

You need to construct it with the override first: cookies = new Cookies( request, response, { secure: true })

from cookies.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.