File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -408,6 +408,37 @@ Note that all configuration options can be set using [environment
408408variables] ( #environment-variables ) , which is often the preferred approach for
409409containers.
410410
411+ ### Caddy
412+
413+ You can proxy requests to imageproxy in your Caddy config using the ` reverse_proxy ` directive:
414+
415+ ``` Caddyfile
416+ @imageproxy path /api/imageproxy/*
417+ handle @imageproxy {
418+ uri replace /api/imageproxy/ /
419+ reverse_proxy http://localhost:4593
420+ }
421+ ```
422+
423+ You can also run an instance of imageproxy embedded in Caddy using the [ caddy module] ( ./caddy/ ) .
424+ This requires a custom build of Caddy with the imageproxy module included
425+ ([ example] ( https://github.com/willnorris/willnorris.com/blob/main/cmd/caddy/caddy.go ) ),
426+ and configuring it with the ` imageproxy ` directive in your Caddyfile:
427+
428+ ``` Caddyfile
429+ @imageproxy path /api/imageproxy/*
430+ handle @imageproxy {
431+ uri replace /api/imageproxy/ /
432+
433+ imageproxy {
434+ cache /data/imageproxy-cache
435+ default_base_url {$IMAGEPROXY_BASEURL}
436+ allow_hosts {$IMAGEPROXY_ALLOWHOSTS}
437+ signature_key {$IMAGEPROXY_SIGNATUREKEY}
438+ }
439+ }
440+ ```
441+
411442### nginx
412443
413444Use the ` proxy_pass ` directive to send requests to your imageproxy instance.
You can’t perform that action at this time.
0 commit comments