Skip to content

Commit

Permalink
https
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Jan 9, 2025
1 parent be120f2 commit e8c172b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions demo/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

:webserver {:exec-fn demo.https/run-webserver
:exec-args {:http {:port 8080
:host "0.0.0.0"}
:https {:port 443}
:ip "0.0.0.0"}
:https {:port 8443}
:letsencrypt {:domain "test.crbclean.com"
:email "[email protected]"}
}}
Expand Down
2 changes: 1 addition & 1 deletion src/modular/webserver/https/proxy.clj
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
["*" (redirect-handler https-port)]]
{:conflicts (constantly nil)})
(ring/create-default-handler))]
(info "redirecting http(80) -> https (443), letsencrypt public: " public-dir)
(info "redirecting http(80) -> https (" https-port "), letsencrypt public: " public-dir)
(run-jetty handler {:port 80
:allow-null-path-info true ; omit the trailing slash from your URLs
:join? false
Expand Down
2 changes: 1 addition & 1 deletion src/modular/webserver/server.clj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
(defn https-creds? [{:keys [certificate]}]
(fs/exists? certificate))

(defn start-https [{:keys [https handler https-a] :as _this}]
(defn start-https [{:keys [handler https https-a] :as _this}]
(let [https (merge https-default https) ; defaults are overwritten by opts
opts (-> https
(rename-keys {:port :ssl-port
Expand Down
3 changes: 1 addition & 2 deletions src/modular/webserver/server/jetty.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
[ring.adapter.jetty :refer [run-jetty]]))

(defn start-jetty [handler {:keys [port] :as opts}]
(info "Starting Jetty web server port:" port "..")
(info "Starting Jetty web server opts: " opts)
(let [opts (merge {:allow-null-path-info true ; omit the trailing slash from your URLs
:ws-max-idle-time 3600000 ; important for nrepl middleware
}
opts
{:join? false})]
(info "opts: " opts)
(run-jetty handler opts)))

(defn stop-jetty
Expand Down

0 comments on commit e8c172b

Please sign in to comment.