-
Notifications
You must be signed in to change notification settings - Fork 10
vhost requests not cached #20
Description
Hi all,
Today I've been integrating a rabbitmq (3.7.12) with an HTTP authentication backend, with a backend cache. The http server is a rails server. I've noticed that everything seems to work well, every requests are cached except the vhost ones, strangely.
All four web services (user,vhost,resource,topic) just reply http status 200 and content 'allow' .
I use mosquitto_sub to connect to the rabbitmq server, and have enabled the mqtt plugin. This is actually my complete conf :
mqtt.vhost = /
mqtt.exchange = mqttexchange
# 24 hours by default
mqtt.subscription_ttl = 86400000
mqtt.prefetch = 10
auth_backends.1 = internal
auth_backends.2 = cache
auth_cache.cached_backend = http
auth_cache.cache_ttl = 120000
auth_cache.cache_refusals = true
auth_http.http_method = post
auth_http.user_path = http://rabbitmq:password@localhost:5000/rabbitmq_auth/user
auth_http.vhost_path = http://rabbitmq:password@localhost:5000/rabbitmq_auth/vhost
auth_http.resource_path = http://rabbitmq:password@localhost:5000/rabbitmq_auth/resource
auth_http.topic_path = http://rabbitmq:password@localhost:5000/rabbitmq_auth/topic
The parameters received on the vhost service look like :
{"username"=>"acfef9c2157f", "vhost"=>"/", "ip"=>"::ffff:127.0.0.1"}
When performing the connection, quite a number of requests are sent to the rails auth backend (user,vhost,resource,topic), all are correctly cached by the cache plugin - except the vhost ones.
I'm not familiar to the erlang language, so I don't have a clue about a potential bug. Any idea?