changeset 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
parents 03f393d572fe
children d4d333cb75b2
files mod_http_oauth2/mod_http_oauth2.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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'";