Skip to content

Serve local files over HTTPS with a generated self-signed certificate.

License

Notifications You must be signed in to change notification settings

evanj/gohttpsserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go HTTPS Server and Proxy

Serves local files over HTTPS using a self-signed certificate. The certificate is generated when the server starts.

Usage

  1. go run cmd/https_server.go
  2. open https://localhost:8000/

Proxy

Proxies HTTPS requests to an HTTP server. Quick and dirty hack I use to test an HTTPS app locally. In production, we use nginx to decode HTTPS. This is a single binary to simulate that environment. It sends X-Forwarded-For and X-Forwarded-Proto headers, and passes through the Host header.

  1. go run cmd/https_proxy.go http://localhost:5000/
  2. open https://localhost:8001/

About

Serve local files over HTTPS with a generated self-signed certificate.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published