cherokee / webserver

Cherokee Web Server
GNU General Public License v2.0
568 stars 104 forks source link

Edit Header in Proxy Handler #1245

Open enrique-quinteros opened 4 years ago

enrique-quinteros commented 4 years ago

There is an option to add headers to the request or the response in the Proxy Handler, but is there a way to edit a header? For example, I want to edit the Set-Cookie header in the response to add "SameSite=none; Secure", but I don't want to lose the information in the cookie (i.e.Session ID).

Before Set-Cookie: JSESSIONID=SOMEDATA

After Set-Cookie: JSESSIONID=SOMEDATA; SameSite=none; Secure

Is it possible to do this with the current version? or is it needed to code a new feature?

I appreciate your help.

skinkie commented 4 years ago

@enrique-quinteros at this moment it is not possible for regular expressions to be placed on headers (opposed to rewriting the URLs). So that would be a new feature.