Repository navigation
How can I set domain for a cookie? #6595
Unanswered
Takabrycheri
asked this question in
Q&A
Replies: 1 comment
|
If you're setting the cookie in an aiohttp server response, pass from aiohttp import web
async def handler(request):
response = web.Response(text="OK")
response.set_cookie("session", cookie_value, domain="example.com", path="/")
return responseThat produces |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, sorry but I'm really new to cookies.
At the moment I only have the value of a cookie to send but now I also have to specify the domain of the cookie, which I didn't need before... but I can't find anything about it.
Could someone please help me?
Thanks in advance
All reactions