From 746d856aef21b25ac3de58f17274c564a41fa30b Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 12 May 2021 19:50:07 +0200 Subject: [PATCH] Fix compatibility with new ngx-oauth proxy --- script/pre-deploy | 2 +- src/callbacks/sirius.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/script/pre-deploy b/script/pre-deploy index b02fffaa..378017ed 100755 --- a/script/pre-deploy +++ b/script/pre-deploy @@ -19,5 +19,5 @@ mv new/fittable.css new/fittable-$md5css.css sed -i "s|fittable.js|fittable-$md5js.js|" new/index.html sed -i "s|fittable.css|fittable-$md5css.css|" new/*.html sed -i "s|fittable.css|new/fittable-$md5css.css|" index.html -sed -i 's|"_oauth/login"|"/_oauth/login"|' new/landing.html +sed -i 's|"_oauth/login"|"/_oauth/login?original_uri=/new/"|' new/landing.html sed -i 's|| \n |g' new/index.html diff --git a/src/callbacks/sirius.js b/src/callbacks/sirius.js index 6f828af2..37ae231f 100644 --- a/src/callbacks/sirius.js +++ b/src/callbacks/sirius.js @@ -332,7 +332,7 @@ function fetchUserCallback (cb) { function logoutUserCallback (cb) { ajaxPost(`${oauthAPIUrl}/logout`, (request) => { if (request.readyState === XMLHttpRequest.DONE) { - if (request.status === 204) { + if (request.status < 400) { cb(null) } else { cb(generateError(request.status, 'Logout failed'))