Skip to content

add secure: 'auto' Option#199

Merged
mcollina merged 4 commits intofastify:masterfrom
Uzlopak:handle-secure-auto
Jul 21, 2022
Merged

add secure: 'auto' Option#199
mcollina merged 4 commits intofastify:masterfrom
Uzlopak:handle-secure-auto

Conversation

@Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Jul 21, 2022

This functionality is basically taken from @fastify/session https://github.com/fastify/session/blob/b1fc11c6fbb16c63a1884f202fcd030ecdb18a07/lib/cookie.js#L17

On the long run, we can remove the cookie class from @fastify/session.

Checklist

@Uzlopak Uzlopak requested a review from climba03003 July 21, 2022 12:55
@Uzlopak Uzlopak changed the title add secure: auto Option add secure: 'auto' Option Jul 21, 2022
Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you document the option?

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Jul 21, 2022

@climba03003
Done. I would rather copy paste the options from the cookie readme and modify it for our needs, but that means probably some licensing matters, so I just added a nothing explaining half sentence.

@climba03003
Copy link
Member

I would rather copy paste the options from the cookie readme and modify it for our needs, but that means probably some licensing matters, so I just added a nothing explaining half sentence.

What I request is actually document how auto should behave.
It is not transparent enough for the user decide to use auto.

I think it is suitable to explain in the format below.

+ `options.secure`: blablabla

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Jul 21, 2022

@climba03003
Better?

Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit d5a3dbe into fastify:master Jul 21, 2022
@Uzlopak Uzlopak deleted the handle-secure-auto branch July 21, 2022 14:46
Uzlopak added a commit to Uzlopak/fastify-cookie that referenced this pull request Jul 25, 2022
* add secure: auto Option

* document deviation from cookie serialize

* describe better

* lowercase Lax
Uzlopak added a commit that referenced this pull request Aug 11, 2022
* integrate cookie signer

* add algorithm as plugin-option

* check for matching error message

* improve tests

* remove unnecessary array conversion

* simplify

* fix comment

* restructure SignerFactory

* update typings

* fix exports

* add benchmarks

* improve perf for multi secrets

* rename SignerFactory to Signer

* Merge branch 'master' into integrate-cookie-signer

* export signerFactory

* Update signer.js

* add secure: 'auto' Option (#199)

* add secure: auto Option

* document deviation from cookie serialize

* describe better

* lowercase Lax

* Bumped v7.3.0

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* make type definitons `"module": "nodenext"` compatible (#184)

* make type definitons `"module": "nodenext"` compatible

* see microsoft/TypeScript#48845

* fix test

* fix default export type

* make typing extra safe and small refactoring

* restore brackets

* add additional properties to named export and fix test suite

* remove formatting

* revert formatting

* reuse type

* Bumped v7.3.1

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* modify types

* remove dummy

* fix regex bottleneck found by sonarqube

Signed-off-by: Matteo Collina <hello@matteocollina.com>
Co-authored-by: Matteo Collina <hello@matteocollina.com>
Co-authored-by: Volodymyr Zhdanov <wight554@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants