Skip to content

Commit a301a39

Browse files
committed
fix tiff copy paste typo
1 parent aba78bd commit a301a39

File tree

6 files changed

+9
-5
lines changed

6 files changed

+9
-5
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ Features:
77
- [x] image crop offset, credit: https://github.com/bobrik/nginx_image_filter
88
- [x] /healthcheck endpoint
99
- [x] empty gif on other errors: 403, 404, 415, 500, 502, 503, 504
10-
- [x] convert/force output to another format, support formats: bmp, jpg, png, gif, webp
10+
- [x] convert/force output to another format, support formats: bmp, jpg, png, gif, webp, and tiff
1111
- [x] use custom ssl and saved config when you mount '/app' volume. nginx logs has also been redirect so you can backup, such as aws s3 sync. Just delete the default redirect to stdout/access.log and stderr/error.log files.
12+
- [x] support international characters in URL
13+
- [x] automatically follow redirect at origin
1214

1315
# What does this solve?
1416
You have a huge repository of images that need dynamic resize and cropping. Cloudinary can be expensive and redundant if you run your own CDN in front of this microservice.

build/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ RUN \
1212
cd /tmp \
1313
&& bash ubuntu.sh
1414

15-
# docker run -it imageid /bin/bash
16-
# ftp passive
15+
# docker run -it -v ./:/backup imageid /bin/bash
16+
# copy image from inside to backup
1717

1818
VOLUME ["/backup"]
1919

1.36 KB
Binary file not shown.

build/nginx_1.13.4-1~xenial_amd64.deb

-540 Bytes
Binary file not shown.

build/src/ngx_http_image_filter_module.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,8 +1326,10 @@ ngx_http_image_out(ngx_http_request_t *r, ngx_uint_t type, gdImagePtr img,
13261326

13271327
} else if (ngx_strncmp(ofmt.data, "bmp", 3) == 0){
13281328
type = NGX_HTTP_IMAGE_BMP;
1329+
13291330
} else if (ngx_strncmp(ofmt.data, "tiff", 4) == 0){
1330-
type = NGX_HTTP_IMAGE_BMP;
1331+
type = NGX_HTTP_IMAGE_TIFF;
1332+
13311333
}
13321334
}
13331335

files/etc/nginx/sites-enabled/server.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ server {
105105
# if ($myhost !~ ".*(host1.com|host2.org|host3.edu|host4.net|host5.info)$") {
106106
# set $image_uri "";
107107
# set $debugkey "$myhost=denied";
108-
# rewrite ^ /403 last;
108+
# return 403;
109109
# break;
110110
# }
111111

0 commit comments

Comments
 (0)