net/httpserver.lua
author Kim Alvefur <zash@zash.se>
Mon, 17 Oct 2022 15:20:06 +0200
changeset 12779 1dd468c63a3d
parent 8682 adc17a2bd6fd
child 12978 ba409c67353b
permissions -rw-r--r--
mod_blocklist: Add option 'migrate_legacy_blocking' to disable migration from mod_privacy Tiny performance improvement for new users by skipping this check. Most servers should have gone trough the migration for all active users long ago. As a suitable first step of phasing out this code, we make it possible to disable it first. Later it can be disabled by default, before finally the code is deleted.

-- COMPAT w/pre-0.9
local log = require "util.logger".init("net.httpserver");
local traceback = debug.traceback;

local _ENV = nil;
-- luacheck: std none

local function fail()
	log("error", "Attempt to use legacy HTTP API. For more info see https://prosody.im/doc/developers/legacy_http");
	log("error", "Legacy HTTP API usage, %s", traceback("", 2));
end

return {
	new = fail;
	new_from_config = fail;
	set_default_handler = fail;
};