Hi,
I’ve been trying to setup Uppy Companion on a https public domain (say for example abc.com
). When I access the URL https://abc.com
on a browser, I’m able to see the response from Companion, which means Nginix and the reverse proxy is working.
The problem, I’m facing is that when I click Google Drive, the oauth is redirected to http://abc.com/drive/redirect
and not https.
My authorized redirect URL on Google is
https://abc.com/drive/redirect
My companion is configured as below:
server: {
host: "http://localhost:3030",
protocol: "http",
oauthDomain: "abc.com",
validHosts: ["abc.com"]
},
companion.socket(3030);
and my nginix config is
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 443 ssl;
listen [::]:443 default_server;
server_name abc.com;
ssl_certificate "companionSSL.pem";
ssl_certificate_key "companionSSLkey.pem";
location / {
proxy_pass http://localhost:3030;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
Appreciate any help on this.
Thanks in advance.