git.99rst.org
/
flatnotes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
ac11815
)
Don't overwrite Authorization HTTP header when no token is saved
author
Code-Otto
<redacted>
Wed, 26 Jun 2024 21:20:26 +0000
(23:20 +0200)
committer
Code-Otto
<redacted>
Wed, 26 Jun 2024 21:20:26 +0000
(23:20 +0200)
This fixes setups where Flatnotes runs behind a proxy doing authentication
on its own
client/api.js
patch
|
blob
|
history
diff --git
a/client/api.js
b/client/api.js
index 4657f9809e3468de62ca6ba2a55d0ba69d4cae62..46e3dcadfb174e5b3827ff800181c008468d05e0 100644
(file)
--- a/
client/api.js
+++ b/
client/api.js
@@
-14,7
+14,9
@@
api.interceptors.request.use(
function (config) {
if (config.url !== "api/token") {
const token = getStoredToken();
- config.headers.Authorization = `Bearer ${token}`;
+ if (token) {
+ config.headers.Authorization = `Bearer ${token}`;
+ }
}
return config;
},
git clone https://git.99rst.org/PROJECT