Comparison

mod_http_oauth2/mod_http_oauth2.lua @ 5218:1f4b768c831a

mod_http_oauth2: Correct field name for HTTP response status code 'code' is used in the incoming side of the Prosody HTTP stack while 'status_code' is used on the response side. Not confusing at all. The default is 200 so this mistake had no real effect.
author Kim Alvefur <zash@zash.se>
date Tue, 07 Mar 2023 13:14:25 +0100
parent 5217:6a27effb3ef0
child 5219:25e824f64fd3
comparison
equal deleted inserted replaced
5217:6a27effb3ef0 5218:1f4b768c831a
45 local _render_html = require"util.interpolation".new("%b{}", st.xml_escape); 45 local _render_html = require"util.interpolation".new("%b{}", st.xml_escape);
46 local function render_page(template, data, sensitive) 46 local function render_page(template, data, sensitive)
47 data = data or {}; 47 data = data or {};
48 data.site_name = site_name; 48 data.site_name = site_name;
49 local resp = { 49 local resp = {
50 code = 200; 50 status_code = 200;
51 headers = { 51 headers = {
52 ["Content-Type"] = "text/html; charset=utf-8"; 52 ["Content-Type"] = "text/html; charset=utf-8";
53 ["Content-Security-Policy"] = "default-src 'self'"; 53 ["Content-Security-Policy"] = "default-src 'self'";
54 ["X-Frame-Options"] = "DENY"; 54 ["X-Frame-Options"] = "DENY";
55 ["Cache-Control"] = (sensitive and "no-store" or "no-cache")..", private"; 55 ["Cache-Control"] = (sensitive and "no-store" or "no-cache")..", private";