Diff

mod_http_oauth2/mod_http_oauth2.lua @ 5470:40c990159006

mod_http_oauth2: Use error status code when rendering error page Shouldn't include a 200 OK status code when showing an error.
author Kim Alvefur <zash@zash.se>
date Thu, 18 May 2023 13:19:25 +0200
parent 5469:03f393d572fe
child 5471:d4d333cb75b2
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua	Thu May 18 13:03:09 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Thu May 18 13:19:25 2023 +0200
@@ -57,7 +57,7 @@
 	data = data or {};
 	data.site_name = site_name;
 	local resp = {
-		status_code = 200;
+		status_code = data.error and data.error.code or 200;
 		headers = {
 			["Content-Type"] = "text/html; charset=utf-8";
 			["Content-Security-Policy"] = "default-src 'self'";