ssl - HTTPS proxy with caddy -


i working golang app , caddy http server. golang app rejects every http connection, can used on https. app kind of api/service consumed other apps. as, requires https installed caddy can take advantage of automatic ssl certificate , use proxy switch between ports.

the application running in port 9000, so, consumers writte mysite.com , caddy should in charge of redirect petitions port 9000 maintaining https. configuration in caddy site is:

mysite.com {     proxy / :9000 {         max_fails 1     }     log logfile } 

nevertheless, seems when proxy made https lost. checked logs application (no logs of caddy) , this:

http: tls handshake error xxx.xxx.xxx.xxx:xxxx: tls: oversized record received length 21536 

so, based in error, me looks http proxy made caddy losing https. can do?

from caddy docs

to destination endpoint proxy to. @ least 1 required, multiple may specified. if scheme (http/https) not specified, http used. unix sockets may used prefixing "unix:".

so maybe sending http requests proxied https endpoint.

does

mysite.com {     proxy / https://localhost:9000 {         max_fails 1     }     log logfile } 

fix it?

if case, may not strictly need app on :9000 listen https. may simplify deployment or cert management have listen http , have caddy manage certs.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -