Here is a better way to redirect from HTTPS to 
HTTP: 
https://github.com/nhooyr/redirecthttp/blob/d87881e4fbfddb1614c9d0934ea97c4163903301/main.go#L10-L19

Also, you don't need a secure variable in the handler, just check for r.TLS.

On Thursday, December 28, 2017 at 12:10:16 PM UTC-5, jzs wrote:
>
> For those interested in hosting multiple golang apps on the same host 
> without using nginx/apache/[insert reverse proxy here].
>
> Shameless plug. I'm the author. But without 
> golang.org/x/crypto/acme/autocert it wouldn't have been possible.
>
>
> https://journal.sketchground.dk/entry/2017-11-25-minimal-reverse-proxy-in-go
>
> Any feedback is more than welcome,
>
> Thanks,
> Jens.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to