Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable cookies on outbound requests #258

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion aries_cloudagent/admin/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Coroutine, Sequence, Set
import uuid

from aiohttp import web, ClientSession
from aiohttp import web, ClientSession, DummyCookieJar
from aiohttp_apispec import docs, response_schema, setup_aiohttp_apispec
import aiohttp_cors

Expand Down Expand Up @@ -382,6 +382,7 @@ async def _process_webhooks(self):
collector: Collector = await self.context.inject(Collector, required=False)
if collector:
session_args["trace_configs"] = [StatsTracer(collector, "webhook-http:")]
session_args["cookie_jar"] = DummyCookieJar()
self.webhook_session = ClientSession(**session_args)
self.webhook_processor = TaskProcessor(max_pending=20)
async for topic, payload in self.webhook_queue:
Expand Down
3 changes: 2 additions & 1 deletion aries_cloudagent/transport/outbound/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging

from aiohttp import ClientSession
from aiohttp import ClientSession, DummyCookieJar

from ...messaging.outbound_message import OutboundMessage
from ..stats import StatsTracer
Expand All @@ -27,6 +27,7 @@ async def start(self):
session_args["trace_configs"] = [
StatsTracer(self.collector, "outbound-http:")
]
session_args["cookie_jar"] = DummyCookieJar()
self.client_session = ClientSession(**session_args)
return self

Expand Down
4 changes: 2 additions & 2 deletions aries_cloudagent/transport/outbound/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging

from aiohttp import ClientSession
from aiohttp import ClientSession, DummyCookieJar

from ...messaging.outbound_message import OutboundMessage

Expand All @@ -21,7 +21,7 @@ def __init__(self) -> None:

async def start(self):
"""Start the outbound transport."""
self.client_session = ClientSession()
self.client_session = ClientSession(cookie_jar=DummyCookieJar())
return self

async def stop(self):
Expand Down