From b0b095b763995f19d77c4fb24a74c9b75cbde757 Mon Sep 17 00:00:00 2001 From: serxoz Date: Tue, 25 Oct 2022 09:34:11 +0200 Subject: [PATCH] =?UTF-8?q?cambios=20na=20web=20ra=C3=ADz=20e=20config=20p?= =?UTF-8?q?ara=20nginx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 36 ++++++++++++++++++++++++++++++++++++ src/vistas/root.rs | 6 +++--- 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 nginx.conf 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() }