S
S
Salavat Sitdikov2017-03-24 04:19:53
Nginx
Salavat Sitdikov, 2017-03-24 04:19:53

Space in cookie value?

The essence of the problem. For users of different cities, different content is displayed for the same domain. The front is nginx, which caches pages by the key - "url + city". The user can change the city himself on the site, then the city is recorded in the cookie.
There was a problem - when there is a space in the name of the city, then "+" is written in the cookie, respectively, two different keys for the city "New Vasyuki" appear - www.site.ru/buy/-Novie Vasyki-/ and www.site.ru/ buy/-Novie+Vasyki-/.
How can you avoid this "plus"? Can nginx be able to cut a string?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question