Will Norris
54ddf21df2
add docs and cleanup data code
...
- simplify ParseOptions
- add lots of docs to ParseOptions and NewRequest
- cleanup some data tests
No behavioral changes.
2014-11-23 15:41:55 -08:00
Will Norris
ea67c79ffe
interpret negative height and width values as 0
2014-11-23 14:01:50 -08:00
Will Norris
2dd79ebd20
minor cleanup of error messages
...
- used same string for logging and error response to ensure they stay in
sync
- pass through any http error status codes from remote URLs
2014-11-21 17:59:51 -08:00
Will Norris
8ada90ffd2
small readme updates
...
- mention in-memory cache and how to use alternate cache implementations
- add link to upstart config script
2014-11-21 10:02:19 -08:00
Will Norris
dd2508d21c
add getting started and deploying instructions
...
This is a first pass at addressing #8
2014-11-21 09:42:42 -08:00
Will Norris
0729544149
add explicit links for example images
...
GitHub uses their own image proxy (camo), which the example images were
linking to. Switch to an explicit link, so that the full exmaple URL
can be seen.
2014-11-21 09:02:24 -08:00
Will Norris
5a4e602373
small cleanup of check304 and add more tests
...
Remove unused ResponseWriter parameter from check304, add function docs,
and add TODO for alternate Etag header values that we should handle.
Add tests for Proxy.allowed and check304.
2014-11-21 07:51:19 -08:00
Will Norris
e0a9588607
add cacheSize flag to cmd/imageproxy
...
httpcache hardcodes the cache size to 100MB. We are still using that as
the default value, but it can now be overridden.
refs #9
2014-11-21 07:48:24 -08:00
Will Norris
7994cb2cf6
handle error returned when fetching remote images
2014-11-19 22:22:21 -08:00
Will Norris
dae09a8c9d
rename proxy.go and remove old data package doc
2014-11-19 22:02:34 -08:00
Will Norris
4a5f24e4ec
there's no need for Options to be a pointer
2014-11-19 21:59:52 -08:00
Will Norris
c5b279b947
move jpeg quality to const
2014-11-19 21:59:12 -08:00
Will Norris
1bf3ccab06
remove unnecessary break statements
2014-11-19 21:57:50 -08:00
Will Norris
7d5c68c4a0
update upstart config to run as www-data user
2014-11-11 08:41:29 -08:00
Will Norris
a80158a53a
add new go14-style import comment
...
see http://golang.org/s/go14customimport
Also rename scripts directory to etc
2014-10-11 18:18:13 -07:00
Will Norris
71a5b6ef84
update example URLs
...
switch from s.wjn.me to willnorris.com/api/imageproxy
2014-09-28 11:55:28 -07:00
Will Norris
1421902e42
remove golang dependency in deb file
2014-08-13 06:49:15 -07:00
Will Norris
bfbc8ff5ee
remove MaxWidth and MaxHeight options
...
These were originally added to prevent a denial of service caused by
requesting very large images, but are no longer needed since we no
longer resize images larger than their original size.
2014-08-06 08:47:41 -07:00
Will Norris
a74e590181
restructure imageproxy package
...
- move binary from imageproxy.go to cmd/imageproxy/main.go
- move proxy package up to top level
2014-07-30 18:23:43 -07:00
Will Norris
c5b89e481c
update URL for example image
2014-07-06 14:43:01 -07:00
Will Norris
98d762ef7a
bump to v0.2.0
2014-07-02 07:42:38 -07:00
Will Norris
c420b5342e
rename readme.md to README.md
2014-06-29 17:30:24 -07:00
Will Norris
919fdfbb78
relocate package to willnorris.com/go/imageproxy
2014-06-29 14:33:56 -07:00
Will Norris
a19264897d
bump jpeg encoding quality
2014-01-09 21:54:36 -08:00
Will Norris
e7655f13d8
log full URL on bad host error
2013-12-26 19:42:18 -08:00
Will Norris
6402de6349
allow wildcard hosts in whitelist
2013-12-26 19:36:18 -08:00
Will Norris
3c72d0b5ca
never resize larger than the original image
2013-12-26 19:32:23 -08:00
Will Norris
8f7f5be71c
etag and last-modified support on incoming requests
...
fixes #3
2013-12-26 19:07:16 -08:00
Will Norris
9837a20ddd
cache transformed images
...
fixes #1
2013-12-26 18:31:20 -08:00
Will Norris
702a07e3b5
move emptyOptions to data.go
2013-12-26 15:04:14 -08:00
Will Norris
cc2bed6b8f
move NewRequest to data.go
2013-12-26 14:38:15 -08:00
Will Norris
c3eda83ab5
add default VERSION string
2013-12-26 13:55:52 -08:00
Will Norris
67bf2f0675
rename init to scripts
2013-12-26 13:50:28 -08:00
Will Norris
0a939cc19d
allow more flexibility in specifying options
...
Options can be specified in any order (size no longer needs to be listed
first), and may be repeated. Duplicated options overwrite previous
values. Technically, non-size options could already be repeated... now
size can as well. There's really not much value to this, it's just an
side-effect of allowing any order.
fixes #5
2013-12-26 13:35:23 -08:00
Will Norris
b4ed3507e3
move option parsing tests to data_test.go
2013-12-26 13:07:17 -08:00
Will Norris
9c911bef14
add newer flags to Options string
2013-12-26 12:50:22 -08:00
Will Norris
fc8552e6b4
collapse data and transform packages into proxy
2013-12-26 12:49:50 -08:00
Will Norris
d8aa853b3d
add example upstart script from s.wjn.me
2013-12-26 11:42:46 -08:00
Will Norris
3e67c64a15
update deb package config
2013-12-26 11:30:28 -08:00
Will Norris
462b70dcc2
rename to 'imageproxy' (drop 'go-' prefix)
2013-12-26 11:14:28 -08:00
Will Norris
26dde07ec0
add -version flag and goxc build config
2013-12-26 11:00:50 -08:00
Will Norris
405faae777
remove logging statement
...
now that httpcache hides the actual HTTP calls, this logging line
doesn't accurately reflect when the images is actually fetched. It
would be nice to get accurate logging back again.
2013-12-26 09:07:06 -08:00
Will Norris
b109a87ece
simplify transform function to only pass bytes
2013-12-26 08:31:52 -08:00
Will Norris
b4fae2dd5f
properly resize when one dimension is specified
2013-12-26 08:31:52 -08:00
Will Norris
1db6456329
add cacheDir for specifying disk cache dir
2013-12-26 08:31:52 -08:00
Will Norris
73f6357cda
rely on httpcache for response caching
2013-12-26 08:31:52 -08:00
Will Norris
b9584c18cb
remove early bail out in image trasform
2013-12-26 08:31:52 -08:00
Will Norris
a0d0260f5e
remove '=' from rotate option
2013-12-07 17:06:36 -08:00
Will Norris
ae66dd52b7
update description of fit option
2013-12-06 22:25:02 -08:00
Will Norris
a039c1bbca
add options to flip horizontally and vertically
2013-12-06 22:19:49 -08:00