mod_http_file_share: Move Authorization type string
It belongs with the header more than the token itself
--- a/plugins/mod_http_file_share.lua Wed Jan 27 17:29:26 2021 +0100
+++ b/plugins/mod_http_file_share.lua Wed Jan 27 17:34:48 2021 +0100
@@ -83,7 +83,7 @@
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 @@
: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);