diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..411ab17 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,36 @@ +server { + if ($host = sh4r.in) { + return 301 https://$host$request_uri; + } # managed by Certbot + + listen 80; + + server_name sh4r.in; + return 301 https://sh4r.in/; + + +} +server{ + listen 443 ssl http2; + + server_name sh4r.in; + + client_max_body_size 128M; + + location / { + proxy_pass http://127.0.0.1:3000/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_buffering off; + } + + ssl_session_cache shared:SSL:1m; + + ssl_ciphers HIGH:!aNULL:!MD5:!RC4; + ssl_prefer_server_ciphers on; + + ssl_certificate /etc/letsencrypt/live/sh4r.in/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/sh4r.in/privkey.pem; +} diff --git a/src/vistas/root.rs b/src/vistas/root.rs index c942dd4..661fedf 100644 --- a/src/vistas/root.rs +++ b/src/vistas/root.rs @@ -11,11 +11,11 @@ SH4R.IN HTTP POST files here: curl -F'file=@yourfile.png' {} -You can also POST remote URLs: -curl -F'url=http://example.com/image.jpg' {} File URLs are valid for aproximately 5 days. +Maximum file size: 128 M + TERMS OF SERVICE ---------------- @@ -41,6 +41,6 @@ UPLOAD DIRECTLY ", - url, url, url); + url, url); Html(html).into_response() }