Cookies across subdomains and hosts

后端 未结 5 2206
被撕碎了的回忆
被撕碎了的回忆 2021-02-19 01:05

In the application I\'m writing using a combination of development environments and languages, I have need of accessing a cookie from two different subdomains, each on a separat

5条回答
  •  借酒劲吻你
    2021-02-19 01:33

    For the benefit of anyone reading this question the code and information contained in the original post are exactly correct and work fine.

    The problem is when you introduce other technology. For instance, I have since learned that sending PHP code through a Python module, one that allows Django to serve PHP files/content, changes a great deal about what is accessible to the script and what is not.

    This was eventually discovered following the advice of Marc Novakowski, who suggested sending $_COOKIE to the log in order to find out what was there.

    I also checked out $_SERVER and $_GET. It was the emptiness of $_GET that tipped me off that the setup I am attempting to use is not as straightforward as I had thought. It was that mistaken understanding that led to not including the information about Django in the original post.

    Apologies and thanks to all who responded to this question!

提交回复
热议问题