# HG changeset patch # User Kim Alvefur # Date 1611765288 -3600 # Node ID 4ade9810ce35f3135e8123bf2e405a5b0c26ce17 # Parent 15ab878a7d23499e833bc0a972a18882dbdde1e8 mod_http_file_share: Move Authorization type string It belongs with the header more than the token itself diff -r 15ab878a7d23 -r 4ade9810ce35 plugins/mod_http_file_share.lua --- 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);