Skip to content

Commit 7ccf6fb

Browse files
committed
correct interceptor order
1 parent 0bad853 commit 7ccf6fb

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/main/com/yetanalytics/lrs/pedestal/interceptor.cljc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@
436436
xapi-ltags-interceptor])
437437

438438
(def xapi-protected-interceptors
439-
[;; one of these two will set up a version value
439+
[;; set up a version value
440440
extract-xapi-version-interceptor
441441
xapi/alternate-request-syntax-interceptor
442442
;; for the check here

src/main/com/yetanalytics/lrs/pedestal/routes.cljc

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
:get :xapi.agents.profile.GET.request/params
6767
:head :xapi.agents.profile.GET.request/params
6868
:delete :xapi.agents.profile.DELETE.request/params))
69-
doc-params-interceptor
70-
(xapi-i/params-interceptor spec-kw)
69+
doc-params-interceptor
70+
(xapi-i/params-interceptor spec-kw)
7171
params-interceptors
7272
(cond-> [doc-params-interceptor]
7373
;; Scan files if scanner is present on PUT/POST
@@ -119,22 +119,20 @@
119119
global-interceptors-no-auth (into wrap-interceptors
120120
(conj i/common-interceptors
121121
lrs-i))
122-
global-interceptors (into wrap-interceptors
123-
(conj i/common-interceptors
124-
lrs-i
125-
auth-i/lrs-authenticate
126-
auth-i/lrs-authorize))
127122
protected-interceptors (into wrap-interceptors
128123
(concat
129-
global-interceptors
130-
i/xapi-protected-interceptors))
124+
i/common-interceptors
125+
i/xapi-protected-interceptors
126+
[lrs-i
127+
auth-i/lrs-authenticate
128+
auth-i/lrs-authorize]))
131129
document-interceptors (into wrap-interceptors
132130
(concat
131+
i/xapi-protected-interceptors
133132
(conj i/doc-interceptors-base
134133
lrs-i
135134
auth-i/lrs-authenticate
136-
auth-i/lrs-authorize)
137-
i/xapi-protected-interceptors))]
135+
auth-i/lrs-authorize)))]
138136
(into #{;; health check
139137
(gc/annotate
140138
["/health"

0 commit comments

Comments
 (0)