Hi,
Is there a way to disable the HTTPS requirement for OAuth2?
I found the following code in access.lua and tried to set accept_http_if_already_terminated to true and add the x-forwarded-proto header to https but it didn't work. Same error {"error_description":"You must use HTTPS","error":"access_denied"}
|
| local function is_https(conf) |
| local result = ngx.var.scheme:lower() == HTTPS |
| if not result and conf.accept_http_if_already_terminated then |
| local forwarded_proto_header = ngx.req.get_headers()["x-forwarded-proto"] |
| result = forwarded_proto_header and forwarded_proto_header:lower() == HTTPS |
| end |
| return result |
| end |
|
Other options would be:
1) Obviously, apply HTTPS: my problem here is that this is a test system and I won't have a valid signed certificate which means that I will need to fiddle with my test clients in order to make them accept that certificate.
2) Recompile the code with that check returning always true. NOOB here so trying to avoid that too.
Cheers,
Luiz