Skip to content

Commit

Permalink
Add proxy-aware middleware to server
Browse files Browse the repository at this point in the history
In order to honour `X-Forwarded-Proto` and other headers that are added
when running the app behind a reverse-proxy, we add relevant middleware
to the app.

Specifically, this will make `absolute-url` properly work.

Fixes #716

Co-authored-by: Gustavo Giráldez <[email protected]>
  • Loading branch information
matiasgarciaisaia and ggiraldez committed Mar 8, 2024
1 parent ae263cc commit b529350
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/planwise/middleware.clj
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
session-config
{:session {:flash true
:store session-store}
:proxy true
:static {:resources "planwise/public"}})]
(let [middleware [#(wrap-not-found % (html-response error-404))
wrap-webjars
Expand Down

0 comments on commit b529350

Please sign in to comment.