Skip to content
Snippets Groups Projects
Commit 8ba4f91e authored by Cam Saul's avatar Cam Saul
Browse files

fixes

parent a0098028
No related branches found
No related tags found
No related merge requests found
......@@ -6,10 +6,9 @@
[metabase.setup :as setup]))
(let [redirect-to-setup? (fn [{:keys [uri]}] ; If we have a setup token present and the user requests a _page_ other than /setup/
(and (setup/token-exists?) ; redirect them
(not (or (re-matches #"^/favicon.ico$" uri)
(re-matches #"^/setup/.*$" uri)))))
(let [redirect-to-setup? (fn [{:keys [uri]}] ; Redirect naughty users who try to visit a page other than setup
(and (setup/token-exists?) ; if setup is not yet complete
(re-matches #"^/setup/.*$" uri)))
index (fn [request]
(if (redirect-to-setup? request) (resp/redirect "/setup/welcome")
(resp/resource-response "frontend_client/index.html")))]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment