broaden whitelist

This commit is contained in:
Bryce
2024-04-10 01:03:05 -07:00
parent f12f8e14c2
commit 162d24c470

View File

@@ -13,12 +13,28 @@
(:uri request) (:uri request)
:request-method (:request-method request)) :request-method (:request-method request))
is-normal-route? (or (keyword? route) is-normal-route? (or (keyword? route)
(keyword? (:handler route)))] ;; TODO SSR icky (keyword? (:handler route)))
whitelist #{:fastlink :oauth :login :health :raw-query :results-csv-query :results-json-query
:export-expected-deposits
:export-trial-balance
:export-sales
:export-transactions
:export-company-vendors
:export-payments
:export-ntg-sales-snapshot
:export-vendors
:export-transactions2
:aggregated-sales-export
:export-raw
:export-invoices
:export-clients
:export-accounts
:export-ntg-account-snapshot
:export-ledger}] ;; TODO SSR icky
(if (and (not= (:version session) current-session-version) (if (and (not= (:version session) current-session-version)
(not= :login route)
(not= :oauth route) (not (whitelist route) )
(not= :oauth (:handler route)) (not (whitelist (:handler route)) )
(not= :login (:handler route))
is-normal-route?) is-normal-route?)
(cond (cond
(or (= :graphql (:handler route)) (or (= :graphql (:handler route))