@@ -65,30 +65,30 @@ authorization_err=403 # jwt doesn't allow request origin
6565cid=" bafybeifpz6onienrgwvb3mw5rg7piq5jh63ystjn7s5wk6ttezy2gy5xwu/Mexico.JPG"
6666url=" ${base_url} /ipfs/${cid} ?format=car"
6767
68- echo Requests succeed without a jwt
68+ echo " Requests succeed without a jwt"
6969code=" $( curl -sw " %{http_code}\n" -o /dev/null " ${url} " ) "
7070test " $code " -eq 200 || exit 1
7171
72- echo Requests fail with explicit allow_list but without an origin header
72+ echo " Requests fail with explicit allow_list but without an origin header"
7373code=" $( curl -sw " %{http_code}\n" -o /dev/null " ${url} &jwt=${jwtAllowExplicit} " ) "
7474test " $code " -eq " $authorization_err " || exit 1
7575
76- echo Requests fail with explicit allow_list but not allowed origin
76+ echo " Requests fail with explicit allow_list but not allowed origin"
7777code=" $( curl -sw " %{http_code}\n" -o /dev/null -H " Origin: https://abc.com" " ${url} &jwt=${jwtAllowExplicit} " ) "
7878test " $code " -eq " $authorization_err " || exit 1
7979
80- echo Requests succeed with a jwt query param
80+ echo " Requests succeed with a jwt query param"
8181code=" $( curl -sw " %{http_code}\n" -o /dev/null -H " Origin: https://abc.com" " ${url} &jwt=${jwtAllowAll} " ) "
8282test " $code " -eq 200 || exit 1
8383
84- echo Requests succeed with a jwt auth header
84+ echo " Requests succeed with a jwt auth header"
8585code=" $( curl -sw " %{http_code}\n" -o /dev/null -H " Origin: https://abc.com" -H " Authorization: Bearer ${jwtAllowAll} " " ${url} " ) "
8686test " $code " -eq 200 || exit 1
8787
88- echo Requests succeed with explicit allow_list and allowed origin
88+ echo " Requests succeed with explicit allow_list and allowed origin"
8989code=" $( curl -sw " %{http_code}\n" -o /dev/null -H " Origin: https://google.com" " ${url} &jwt=${jwtAllowExplicit} " ) "
9090test " $code " -eq 200 || exit 1
9191
92- echo Requests succeed with allow_list == [* ] and without an origin header
92+ echo " Requests succeed with allow_list == [*] and without an origin header"
9393code=" $( curl -sw " %{http_code}\n" -o /dev/null " ${url} &jwt=${jwtAllowAll} " ) "
9494test " $code " -eq 200 || exit 1
0 commit comments