diff --git a/README.md b/README.md index f7a3a71..086be37 100644 --- a/README.md +++ b/README.md @@ -105,3 +105,17 @@ header that the client sends. We can still wrap the plain-text page in a single We will try as hard as possible to not store any data about our users, and will only provide any data when we have the legal obligation to do so. +## Sample `nginx` config + +``` +server { + location / { + root /var/www/rushlink; + proxy_pass http://127.0.0.1:8000; + proxy_set_header Host rushlink.local; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_http_version 1.1; + } +} +``` + diff --git a/assets/templates/html/index.html.tmpl b/assets/templates/html/index.html.tmpl index 7b839d7..a182d7f 100644 --- a/assets/templates/html/index.html.tmpl +++ b/assets/templates/html/index.html.tmpl @@ -9,9 +9,9 @@ the command line. ## USAGE # Shorten a URL - curl -F'shorten=http://example.com/some/long/url' {{.Request.Host}} + curl -F'shorten=http://example.com/some/long/url' https://{{.Request.Host}} # Shorten a URL with a token to delete it later - curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' {{.Request.Host}} + curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' https://{{.Request.Host}} {{end}} diff --git a/assets/templates/txt/index.txt.tmpl b/assets/templates/txt/index.txt.tmpl index 20b7c15..9dd38e7 100644 --- a/assets/templates/txt/index.txt.tmpl +++ b/assets/templates/txt/index.txt.tmpl @@ -7,7 +7,7 @@ the command line. ## USAGE # Shorten a URL - curl -F'shorten=http://example.com/some/long/url' {{.Request.Host}} + curl -F'shorten=http://example.com/some/long/url' https://{{.Request.Host}} # Shorten a URL with a token to delete it later - curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' {{.Request.Host}} + curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' https://{{.Request.Host}}