Software /
code /
prosody
Comparison
plugins/mod_http_file_share.lua @ 11398:a1f26d17d70f
mod_http_file_share: Allow credentials via CORS (needed for auth token)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 23 Feb 2021 02:56:49 +0100 |
parent | 11394:420787340339 |
child | 11402:a3be7b3cf1e1 |
comparison
equal
deleted
inserted
replaced
11397:27a22a1f141c | 11398:a1f26d17d70f |
---|---|
430 module:hook("iq-get/host/urn:xmpp:http:upload:0:request", handle_slot_request); | 430 module:hook("iq-get/host/urn:xmpp:http:upload:0:request", handle_slot_request); |
431 | 431 |
432 if not external_base_url then | 432 if not external_base_url then |
433 module:provides("http", { | 433 module:provides("http", { |
434 streaming_uploads = true; | 434 streaming_uploads = true; |
435 cors = { | |
436 credentials = true; | |
437 }; | |
435 route = { | 438 route = { |
436 ["PUT /*"] = handle_upload; | 439 ["PUT /*"] = handle_upload; |
437 ["GET /*"] = handle_download; | 440 ["GET /*"] = handle_download; |
438 ["GET /"] = function (event) | 441 ["GET /"] = function (event) |
439 return prosody.events.fire_event("http-message", { | 442 return prosody.events.fire_event("http-message", { |