@@ -116,6 +116,7 @@ def __init__(self, helper, config: Dict, callback) -> None:
116
116
self .helper = helper
117
117
self .callback = callback
118
118
self .host = config ["connection" ]["host" ]
119
+ self .vhost = config ["connection" ]["vhost" ]
119
120
self .use_ssl = config ["connection" ]["use_ssl" ]
120
121
self .port = config ["connection" ]["port" ]
121
122
self .user = config ["connection" ]["user" ]
@@ -192,7 +193,7 @@ def run(self) -> None:
192
193
self .pika_parameters = pika .ConnectionParameters (
193
194
host = self .host ,
194
195
port = self .port ,
195
- virtual_host = "/" ,
196
+ virtual_host = self . vhost ,
196
197
credentials = self .pika_credentials ,
197
198
ssl_options = pika .SSLOptions (create_ssl_context (), self .host )
198
199
if self .use_ssl
@@ -789,7 +790,7 @@ def send_stix2_bundle(self, bundle, **kwargs) -> list:
789
790
pika_parameters = pika .ConnectionParameters (
790
791
host = self .config ["connection" ]["host" ],
791
792
port = self .config ["connection" ]["port" ],
792
- virtual_host = "/" ,
793
+ virtual_host = self . config [ "connection" ][ "vhost" ] ,
793
794
credentials = pika_credentials ,
794
795
ssl_options = pika .SSLOptions (
795
796
create_ssl_context (), self .config ["connection" ]["host" ]
0 commit comments