0

So let's say I have a site at example.com.

I would like to setup another site at example.com/somewhere else.

Can Ngnix be configured so these sites are not connected in anyway? Meaning, a session variable started on /somewhere can't be seen on example.com?

1 Answer 1

0

Although I presume it's valid to ask how nginx can help here, this matter is ultimately influenced by the web-browser, too, and is outside of nginx' domain.

There is no way to prevent an app at example.com/somewhere from setting cookies for example.com/. Sure, you could potentially block certain Set-Cookie directives through nginx or another web-server, but the app could still use JavaScript for setting such cookies.

Using distinct domain names is the only way to achieve separation between the two apps. See https://security.stackexchange.com/questions/15939/does-setting-the-cookie-path-protect-me-from-xss-from-another-context/32698#32698.

1
  • Thannks for the info!
    – dpluscc
    Mar 21, 2013 at 2:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .