You've already forked img-proxy-url-generator
Update README.md
Signed-off-by: Ron Rise <29732851+ronrise@users.noreply.github.com>
This commit is contained in:
16
README.md
16
README.md
@@ -1,25 +1,29 @@
|
|||||||
# img-proxy url generator
|
# img-proxy url generator
|
||||||
|
|
||||||
|
|
||||||
|
[host](https://docs.imgproxy.net/installation) an instance of img-proxy
|
||||||
|
|
||||||
img proxy [docs](https://docs.imgproxy.net/usage/processing)
|
img proxy [docs](https://docs.imgproxy.net/usage/processing)
|
||||||
|
|
||||||
## build
|
## build
|
||||||
|
|
||||||
you can optionally hard code a path prefix on build
|
you can optionally hard code a path prefix when building
|
||||||
```shell
|
```shell
|
||||||
go build --ldflags="-X 'github.com/siteworxpro/img-proxy-url-generator/generator.PathPrefix=s3://mybucket'"
|
go build --ldflags="-X 'github.com/siteworxpro/img-proxy-url-generator/generator.PathPrefix=s3://mybucket'"
|
||||||
```
|
```
|
||||||
|
|
||||||
## config file
|
## config file
|
||||||
|
|
||||||
###### params
|
### params
|
||||||
|
|
||||||
[img-proxy]
|
[img-proxy]
|
||||||
- `key` sha256 hmac key
|
- `key` sha256 hmac key
|
||||||
- `salt` sha256 hmac salt
|
- `salt` sha256 hmac salt
|
||||||
- `host` img-proxy server hostname
|
- `host` img-proxy server hostname
|
||||||
- `encryption-key` aes encryption key
|
- `encryption-key` aes encryption key
|
||||||
- `plain-url` send plain filename. bypasses all encoding
|
- `plain-url` bypasses all encoding and uses plain filename
|
||||||
|
|
||||||
|
example config file
|
||||||
```ini
|
```ini
|
||||||
[img-proxy]
|
[img-proxy]
|
||||||
key=2c...47
|
key=2c...47
|
||||||
@@ -29,7 +33,7 @@ encryption-key=1c...0b
|
|||||||
plain-url=1
|
plain-url=1
|
||||||
```
|
```
|
||||||
|
|
||||||
## usage
|
## usage examples
|
||||||
|
|
||||||
generate a plain url with an insecure signature
|
generate a plain url with an insecure signature
|
||||||
```ini
|
```ini
|
||||||
@@ -73,7 +77,7 @@ salt=3f...4a
|
|||||||
https://i.fooo.com/NIColt6GBjtbquJXAtEMMsptARPw0CdeduEcu-S9Voc/raw:1/bG9jYWw6Ly9teS1zdXBlci1pbWFnZS5wbmc
|
https://i.fooo.com/NIColt6GBjtbquJXAtEMMsptARPw0CdeduEcu-S9Voc/raw:1/bG9jYWw6Ly9teS1zdXBlci1pbWFnZS5wbmc
|
||||||
```
|
```
|
||||||
|
|
||||||
generate an encrypted url
|
generate an encrypted url with a signature
|
||||||
```ini
|
```ini
|
||||||
[img-proxy]
|
[img-proxy]
|
||||||
host=https://i.fooo.com
|
host=https://i.fooo.com
|
||||||
@@ -88,7 +92,7 @@ encryption-key=1c...0b
|
|||||||
https://i.fooo.com/m3YtaMSgL86qCnfKCnS2i9_vLRmJSogdBx1o86cWbuc/raw:1/enc/F6FAWktv2SAFe5UQwMme0pB6JwKQJVtTI_6Xx-PUfKANdQk0pD1I13NPnv0CvkFT
|
https://i.fooo.com/m3YtaMSgL86qCnfKCnS2i9_vLRmJSogdBx1o86cWbuc/raw:1/enc/F6FAWktv2SAFe5UQwMme0pB6JwKQJVtTI_6Xx-PUfKANdQk0pD1I13NPnv0CvkFT
|
||||||
```
|
```
|
||||||
|
|
||||||
generate a url with params
|
generate with params
|
||||||
```bash
|
```bash
|
||||||
./imgproxy --image "local:///my-super-image.png" -p h:200 -p rot:90
|
./imgproxy --image "local:///my-super-image.png" -p h:200 -p rot:90
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user