File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 65
65
; ; default ports
66
66
allowed-list
67
67
(or allowed-origins
68
- (cond-> [(format " http://%s:%s" http-host http-port)
68
+ (cond-> [(format " http://localhost:%s" http-port)
69
+ (format " https://localhost:%s" ssl-port)
70
+ (format " http://%s:%s" http-host http-port)
69
71
(format " https://%s:%s" http-host ssl-port)]
70
72
(= http-port 80 ) (conj (format " http://%s" http-host))
71
73
(= ssl-port 443 ) (conj (format " https://%s" http-host))))]
Original file line number Diff line number Diff line change 23
23
24
24
(defn- login-account
25
25
[headers body]
26
- (curl/post " http://0.0.0.0 :8080/admin/account/login"
26
+ (curl/post " http://localhost :8080/admin/account/login"
27
27
{:headers headers
28
28
:body body}))
29
29
30
30
(defn- create-account
31
31
[headers body]
32
- (curl/post " http://0.0.0.0 :8080/admin/account/create"
32
+ (curl/post " http://localhost :8080/admin/account/create"
33
33
{:headers headers
34
34
:body body}))
35
35
72
72
(is-err-code (create-account bad-cors-headers req-body) 403 )))
73
73
(testing " create account with default CORS check success"
74
74
(let [good-cors-headers
75
- (merge headers {" Origin" " http://0.0.0.0 :8080" })
75
+ (merge headers {" Origin" " http://localhost :8080" })
76
76
{:keys [status body]}
77
77
(create-account good-cors-headers req-body)
78
78
edn-body (u/parse-json body)]
106
106
(is (some? seed-jwt)))
107
107
(testing " create account with custom CORS check failure"
108
108
(let [bad-cors-headers
109
- (merge headers {" Origin" " http://0.0.0.0 :8080" })]
109
+ (merge headers {" Origin" " http://localhost :8080" })]
110
110
(is-err-code (create-account bad-cors-headers req-body) 403 )))
111
111
(testing " create account with custom CORS check success"
112
112
(let [good-cors-headers
You can’t perform that action at this time.
0 commit comments