Skip to content

Commit c9fc6e5

Browse files
authored
Merge pull request lucaslorentz#754 from caph1993/patch-1
Enhance README with Caddy proxying and redirection examples
2 parents a359936 + 35b9f27 commit c9fc6e5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,13 @@ caddy.rewrite: * /target{path}
372372
caddy.reverse_proxy: {{upstreams}}
373373
```
374374
375+
Proxying requests matching a path
376+
```yml
377+
caddy: example.com
378+
caddy.handle: /source/*
379+
caddy.handle.0_reverse_proxy: {{upstreams}}
380+
```
381+
375382
Proxying requests matching a path, while stripping that path prefix
376383
```yml
377384
caddy: example.com
@@ -402,6 +409,13 @@ caddy: example.com, example.org, www.example.com, www.example.org
402409
caddy.reverse_proxy: {{upstreams}}
403410
```
404411

412+
Redirecting
413+
```yml
414+
caddy: example.com
415+
caddy.redir_0: /favicon.ico /alternative/icon.ico 302
416+
caddy.redir_1: /photo.png /updated-photo.png 302
417+
```
418+
405419
**More community-maintained examples are available in the [Wiki](https://github.com/lucaslorentz/caddy-docker-proxy/wiki).**
406420

407421
## Docker configs

0 commit comments

Comments
 (0)