Questions tagged [http-cookie]

The tag has no usage guidance.

0
votes
2answers
139 views

Transform Apache Cookie logs to json with rsyslogd

I am logging cookie headers, some cookies may have due date, some others not, the same is tru for other cookie parameters, I need to implement a centrilaized logging, so before sending those to ...
0
votes
0answers
1k views

Cookies aren't being set/overwritten through nginx reverse proxy

For some reason, when I'm proxying my API request through an nginx reverse proxy, my cookies aren't being overwritten with the new values. I've tried adding the following to my nginx config, but I'm ...
1
vote
1answer
426 views

Why HTACCESS RewriteCond %{HTTP_COOKIE} only for php and not working for html?

I was trying to redirect all direct access in my subfolder using this code RewriteEngine on RewriteCond %{HTTP_COOKIE} !user_cookie=[^;] RewriteRule .* http://webhost.org/ [R=301,L] I realise it ...
1
vote
1answer
6k views

What is the difference between http_cookie and cookie_name in Nginx?

I want to add remote ip as a Cookie in Nginx, so that it can be passed on to AWS Load Balancer for Load balancer stickiness. location / { proxy_set_header Cookie "$http_cookie; ip=$remote_addr"; ...
1
vote
0answers
849 views

write condition if cookie doesn't exist not working

Ref: Correct way to block a site if a cookie isn't present apache 2.4 We followed the answer and it didn't work. We want to redirect to another page when the cookie does NOT exist (or contain ...
1
vote
2answers
854 views

How do I prevent nginx from stripping secure cookies?

We're setting the secure flag on our cookies and nginx is refusing to transmit them because we're communicating with it over HTTP. This is perfectly understandable, as that is the expected behavior. ...
0
votes
1answer
2k views

How to use a hypen in cookie names for nginx?

I want to use the new cookie-prefixes, which are not yet standardized by the IETF. These are __Secure- and __Host-. So let's e.g. set this cookie (here the header returned by the server): Set-Cookie:...
0
votes
1answer
933 views

Correct way to block a site if a cookie isn't present apache 2.4

I'm using apache 2.4.12 (Ubunutu 15.10) as an oauth2 proxy behind a node app. The app sends lots of unauthenticated requests before login b/c it doesn't know it's not authenticated (it doesn't know/...
1
vote
2answers
752 views

nginx -> serve different files using try_files based on cookies (conditions, if, then, else)

I need to configure an nginx server so that: If user has a specific cookie so the server must send a file, else the server must send another one. I read plenty of related articles, but nothing helped, ...
0
votes
1answer
3k views

NGINX cache based on cookies

Is there a way for NGINX to have a different cache depending on the value of a cookie? In my case, I have a website (in my case, a plugin) that creates a cookie called devicePixelRatio. This is 1 in ...
1
vote
0answers
2k views

HAproxy ACL based on backend application session cookie to replace HTTP Basic Auth

I would need some help on HAproxy configuration to bypass HTTP basic auth and let the user use a specific backend in case there is a valid session cookie present from another backend application. I ...
2
votes
1answer
497 views

Conditionally serving high resolution and WebP images with nginx

Not sure if I'm trying to pull off the impossible, but I'm wanting to configure Nginx to serve ".webp" files to browsers that support the file format and serve fallback files (i.e. pngs, jpgs, etc.) ...
3
votes
4answers
16k views

Adding “HttpOnly” and “Secure” cookie flags on Nginx & PHP

I have Nginx running with PHP and WordPress. Acunetix recommends setting these flags, but they provide no documentation. I have looked around a bit, but I have not seen anything that shows exactly how ...
0
votes
1answer
3k views

Can Apache clean cookies from a request to specific URLs?

We have the following configuration: <Directory /docs> AuthFormAuthoritative Off AuthType None Allow from all Satisfy any Options FollowSymLinks </Directory> Problem: ...
1
vote
1answer
15k views

checking and reading cookies with nginx

I can't find much ressources on how to manage cookies with nginx… I've seen that two variables are relatives to cookies, that is $http_cookies and $cookie_COOKIENAME. Anyway, i absolutely doesn't ...
0
votes
1answer
1k views

Why can't Windows Server 2008 create cookies?

Scenario: I have a web application (SnapshotServer) which uses a WebBrowser control to take a snapshot images of a web page. I use a WebBrowser control within SnapshotServer to navigate to a entry ...
6
votes
2answers
6k views

How to make Varnish ignore, not delete cookies

I want to use Varnish to cache certain pages even in the presence of cookies. There are 3 possibilities that I need to take care of: An anonymous user is viewing some page A logged in user is viewing ...
1
vote
1answer
325 views

How to enable/disable mod_deflate based on a cookie?

I would like to enable mod_deflate based on the presence and value of a certain cookie. I know it’s possible to do cookie manipulation and tests with mod_rewrite, but I’m not sure how to do that kind ...