Hi All,
I'm evaluating a trial copy of Rstudio Connect this weekend. So far it's going well, but I'm left with an annoying error. It's set up behind an nginx proxy using Google OAuth2. Everything works fine, except that as the Google OAuth2 interface redirects back to Rstudio Connect I get:
{"code":97,"error":"Changing host or scheme in redirect is forbidden.","payload":null}
If I then refresh the page I'm authenticated as expected. I'm struggling to work out where to look next to troubleshoot this.
Google OAuth2 setup seems to be OK, with the redirect uri:
https://my.frontend.com:443/__login__/callback
and the origin uri:
https://my.frontend.com:443
(I've tried with & without the port)
My nginx config seems to be as per the manual, except it forces https. Here's something similar to a minimum failing example:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name my.frontend.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name my.frontend.com;
ssl on;
ssl_certificate fullchain.cer;
ssl_certificate_key tls.key;
client_max_body_size 0;
location / {
proxy_pass https://my.backend.com:443;
proxy_set_header X-RSC-Request $scheme://$host:$server_port$request_uri;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
proxy_buffering off;
}
}
Any ideas on where I should be looking to try to track this one down?
Thanks