forked from electricdusk/rushlink
		
	index templates: assume we run on https. README: example nginx config
Fixes #10
This commit is contained in:
		
							parent
							
								
									801ac8adbb
								
							
						
					
					
						commit
						e7b71eca69
					
				
							
								
								
									
										14
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								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;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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}}
 | 
			
		||||
 | 
			
		||||
@ -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}}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user