eduardoboucas / staticman

💪 User-generated content for Git-powered websites
https://staticman.net
MIT License
2.42k stars 545 forks source link

Support HTTPS in staticman API #105

Open nakoo opened 7 years ago

nakoo commented 7 years ago

It looks staticman already supports HTTPS in previous version. (https://github.com/eduardoboucas/staticman/commit/90cff297bad4bfdbb48e266c33124d459b3ece9b)

Is it possible in 2.0?

meygerjos commented 7 years ago

I notice that the existing staticman API ([https://api.staticman.net]()) does support HTTPS! There seem to be two HTTP ports and two HTTPS ports open:

> nmap api.staticman.net

Starting Nmap 7.01 ( https://nmap.org ) at 2017-05-29 01:22 UTC
Nmap scan report for api.staticman.net (104.27.140.78)
Host is up (0.0014s latency).
Other addresses for api.staticman.net (not scanned): 104.27.141.78 2400:cb00:2048:1::681b:8c4e 2400:cb00:2048:1::681b:8d4e
Not shown: 996 filtered ports
PORT     STATE SERVICE
80/tcp   open  http
443/tcp  open  https
8080/tcp open  http-proxy
8443/tcp open  https-alt

Nmap done: 1 IP address (1 host up) scanned in 32.17 seconds

Could @eduardoboucas tell us how he set this up? I'm currently trying to make an instance, and mine doesn't work with HTTPS.

davidak commented 6 years ago

Maybe just use a reverse-proxy for HTTPS support. It's easy with nginx or caddy.

https://docs.nginx.com/nginx/admin-guide/security-controls/securing-http-traffic-upstream/ https://caddyserver.com/docs/proxy