From 4dad6bef40a1e57b21f8691ab8886035bf920440 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 11 Dec 2019 12:14:39 +0100 Subject: [PATCH] :bug: Fix cookie elimination issues. --- backend/src/uxbox/http/handlers.clj | 2 +- backend/src/vertx/web/interceptors.clj | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/uxbox/http/handlers.clj b/backend/src/uxbox/http/handlers.clj index fcb6371a34..c21d3d1d9f 100644 --- a/backend/src/uxbox/http/handlers.clj +++ b/backend/src/uxbox/http/handlers.clj @@ -55,7 +55,7 @@ (-> (session/delete token) (p/then' (fn [token] {:status 204 - :cookies {"auth-token" {:value nil}} + :cookies {"auth-token" nil} :body ""}))))) (defn register-handler diff --git a/backend/src/vertx/web/interceptors.clj b/backend/src/vertx/web/interceptors.clj index 41d08b659f..bca3225138 100644 --- a/backend/src/vertx/web/interceptors.clj +++ b/backend/src/vertx/web/interceptors.clj @@ -55,7 +55,9 @@ ^HttpServerResponse res (get-in data [:request ::vh/response])] (when (map? cookies) (vu/doseq [[key val] cookies] - (.addCookie res (build-cookie key val)))) + (if (nil? val) + (.removeCookie res key) + (.addCookie res (build-cookie key val))))) data))}) ;; --- Params