Shiny Proxy Redirecting to HTTP after log in

I have sucessfully set up an Apache HTTPD web server so that I can access my website over https (this is set up with aws if that makes a differnce).

When i visit

I (as expected) get the shiny proxy log in page. For now this is set up to use simple authentication.

However when I log in (which is sucessful) the page i am viewing redirects me to . I need it to stay on https especially because google auth will not allow you to redirect to an http page.

Following other answers on this page i have tried adding this line outside the proxy block in the application.yml file
useForwardHeaders: true

I have also tried adding
requestheader set x-forwarded-proto https
to my apache config file.
Nethier of these help. Does anyone have any thoughts about how i might be able to fix this?