Search code examples
wordpresssecuritycookiesblogs

prevent send cookie to wordpress in subroute


I have a two websites.One is with django and onother on is wordpress. I've configured wordpress on a url.For example xyz.com/blog.I handle my django sessions in cookie. Now I worry about security of my cookie.What if some security issue become in wordpress and the attacker steal my cookies from wordpress blog?

Can I prevent sending cookies for my url?


Solution

  • Cookies will be sent by the browser as long as the domain and the path matches. If you set path to "PathA" cookies will only be sent on requests to /PathA, but not to /PathB or /PathC. But you can't set it to send to all paths except PathA which seems to be what you want. If you only work with two paths such as /blog and /app you can set cookie path to /app and they should never go be included in requests to /blog.