J
J
JavaSscriptNoob2021-12-22 16:09:50
JavaScript
JavaSscriptNoob, 2021-12-22 16:09:50

Is it possible to set the secure flag for cookies on the front side?

Hello everyone, is it possible to set / change cookies from the back by making them with the secure flag on the front side, and if so, how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Turnaviotov, 2021-12-22
@foxmuldercp

Secure - Cookie will be sent in HTTPS transmission only.
These flags are used with the 'secure' attribute: _Secure-
must not have 'domain' attribute, it will be only sent to the host which set it.
Must have a 'path' attribute, that is set to '/', because it will be sent to the host in every request from the host.
in principle, you can start with this list (found on SO)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question