# HG changeset patch # User bsw # Date 1603360335 -7200 # Node ID 26a1ed6bc9df32388d5cee3fa732b055e72fd0cc # Parent a0b791073159b8f6c63240e30530a01a1034eae2 Allow cross site request to validate endpoint diff -r a0b791073159 -r 26a1ed6bc9df app/main/http_options.lua --- a/app/main/http_options.lua Tue Oct 20 18:15:13 2020 +0200 +++ b/app/main/http_options.lua Thu Oct 22 11:52:15 2020 +0200 @@ -3,7 +3,9 @@ return end -if request.get_module() == "oauth2" and request.get_view() == "session" then +if request.get_module() == "oauth2" and + (request.get_view() == "session" or request.get_view() == "validate") +then local origin = request.get_header("Origin") if origin then request.add_header("Access-Control-Allow-Origin", origin)