diff options
author | Kim Alvefur <zash@zash.se> | 2021-01-27 17:34:48 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-01-27 17:34:48 +0100 |
commit | 93494930ea014c8b478089faec609798e50d4780 (patch) | |
tree | cf4150b7aa44e4de97166719982e94080f17fbea | |
parent | 943dc1848637788cd88985f78b50e30224eac68b (diff) | |
download | prosody-93494930ea014c8b478089faec609798e50d4780.tar.gz prosody-93494930ea014c8b478089faec609798e50d4780.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.lua | 4 |
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); |