aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-27 17:34:48 +0100
committerKim Alvefur <zash@zash.se>2021-01-27 17:34:48 +0100
commit02595598b0eeb9cb6c39046c11a442121c8e9886 (patch)
treecf4150b7aa44e4de97166719982e94080f17fbea
parent9a74f504941160fe4da5a2830426fc5c403627ad (diff)
downloadprosody-02595598b0eeb9cb6c39046c11a442121c8e9886.tar.gz
prosody-02595598b0eeb9cb6c39046c11a442121c8e9886.zip
mod_http_file_share: Move Authorization type string
It belongs with the header more than the token itself
-rw-r--r--plugins/mod_http_file_share.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index e6f050a9..ca835727 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -83,7 +83,7 @@ function may_upload(uploader, filename, filesize, filetype) -- > boolean, error
end
function get_authz(uploader, filename, filesize, filetype, slot)
- return "Bearer "..jwt.sign(secret, {
+ return jwt.sign(secret, {
sub = uploader;
filename = filename;
filesize = filesize;
@@ -138,7 +138,7 @@ function handle_slot_request(event)
:tag("slot", { xmlns = namespace })
:tag("get", { url = slot_url }):up()
:tag("put", { url = upload_url })
- :text_tag("header", authz, {name="Authorization"})
+ :text_tag("header", "Bearer "..authz, {name="Authorization"})
:reset();
origin.send(reply);