O
O
olezhenka2018-04-20 19:03:09
Node.js
olezhenka, 2018-04-20 19:03:09

Why if the cookie is set to secure: true, then they are not saved on the client?

I use express session + passportJS;
Everywhere and always https, all redirects go to https;
app.set('trust proxy', 1) is at the very beginning of express() initialization;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
olezhenka, 2018-04-20
@olezhenka

In general, it was necessary to change the nodejs proxy configuration in nginx:

location /api/ {
                proxy_pass  http://localhost:8080;
                proxy_redirect off;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto https;
        }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question