Changeset

3442:05725785e3a6

mod_http_authentication: Allow HTTP error events to pass through (fixes #1293)
author Kim Alvefur <zash@zash.se>
date Tue, 15 Jan 2019 15:01:04 +0100
parents 3441:0bff7d5ca81d
children 3443:284d8c18060e
files mod_http_authentication/mod_http_authentication.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_authentication/mod_http_authentication.lua	Mon Jan 14 10:56:19 2019 +0100
+++ b/mod_http_authentication/mod_http_authentication.lua	Tue Jan 15 15:01:04 2019 +0100
@@ -9,7 +9,7 @@
 
 module:wrap_object_event(server._events, false, function (handlers, event_name, event_data)
 	local request = event_data.request;
-	if request and not unauthed_endpoints[request.path] then
+	if event_name ~= "http-error" and request and not unauthed_endpoints[request.path] then
 		local response = event_data.response;
 		local headers = request.headers;
 		if not headers.authorization then