Skip to content
Snippets Groups Projects
Unverified Commit 4a757af2 authored by Cam Saul's avatar Cam Saul
Browse files

Fix regression with Jetty SSL config options

parent 79d42093
Branches
Tags
No related merge requests found
......@@ -214,18 +214,20 @@
:max-idle-time (config/config-int :mb-jetty-maxidletime)})
(config/config-str :mb-jetty-daemon) (assoc :daemon? (config/config-bool :mb-jetty-daemon))
(config/config-str :mb-jetty-ssl) (-> (assoc :ssl? true)
(merge jetty-ssl-config))))
(merge (jetty-ssl-config)))))
(defn- log-config [jetty-config]
(log/info (trs "Launching Embedded Jetty Webserver with config:")
"\n"
(with-out-str (pprint/pprint (m/filter-keys #(not (re-matches #".*password.*" (str %)))
jetty-config)))))
(defn start-jetty!
"Start the embedded Jetty web server."
[]
(when-not @jetty-instance
(let [jetty-ssl-config (jetty-ssl-config)
jetty-config (jetty-config)]
(log/info (trs "Launching Embedded Jetty Webserver with config:")
"\n"
(with-out-str (pprint/pprint (m/filter-keys #(not (re-matches #".*password.*" (str %)))
jetty-config))))
(let [jetty-config (jetty-config)]
(log-config jetty-config)
;; NOTE: we always start jetty w/ join=false so we can start the server first then do init in the background
(->> (ring-jetty/run-jetty app (assoc jetty-config :join? false))
(reset! jetty-instance)))))
......
(ns metabase.core-test
(:require [expectations :refer [expect]]
[metabase
[config :as config]
[core :as core]]))
;; Make sure our Jetty config functions work as expected/we don't accidentally break things (#9333)
(expect
{:keystore "10"
:max-queued 10
:port 10
:min-threads 10
:host "10"
:daemon? false
:ssl? true
:trust-password "10"
:key-password "10"
:truststore "10"
:max-threads 10
:max-idle-time 10
:ssl-port 10}
(with-redefs [config/config-str (constantly "10")]
(#'core/jetty-config)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment