index templates: assume we run on https. README: example nginx config

Fixes #10
This commit is contained in:
2019-11-09 22:29:01 +01:00
parent 801ac8adbb
commit e7b71eca69
3 changed files with 18 additions and 4 deletions

View File

@@ -9,9 +9,9 @@ the command line.
## USAGE
# Shorten a URL
curl -F'shorten=http://example.com/some/long/url' <a href="{{.Request.Host}}">{{.Request.Host}}</a>
curl -F'shorten=http://example.com/some/long/url' <a href="//{{.Request.Host}}">https://{{.Request.Host}}</a>
# Shorten a URL with a token to delete it later
curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' <a href="{{.Request.Host}}">{{.Request.Host}}</a>
curl -F'shorten=http://example.com/some/long/url' -F'deleteToken=' <a href="//{{.Request.Host}}">https://{{.Request.Host}}</a>
</pre>
{{end}}

View File

@@ -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}}