Simple caching proxy written in Golang backed by Redis.
4.5K

Simple Reverse Proxy with Caching, written in Go, using Redis.
>>> (semi) production-ready <<<
When the request is cached:
.---------. .---------. .---------.
| | | | | |
| | | | | |
you --->|---->----|--->---|---->----|--->---|-->--. |
| | | | | | |
<---|----<----|---<---|----<----|---<---|--<--' |
`---------´ `---------´ `---------´
network go-proxy-cache redis
When the request is not cached:
website
,_,
| |
.---+-+---. .---------. .---------.
| | '-->|--->---|---->----|--->---|-->--, |
| '-<---|---<---|<--, | | | |
| | | | | | | |
you --->|---->----|--->---|---' | | | |
| | | | | | |
<---|----<----|---<---|----<----|---<---|--<--' |
`---------´ `---------´ `---------´
network go-proxy-cache redis
PURGE on the resource URI.304 Not Modified, managing HTTP headers If-Modified-Since, If-Unmodified-Since, If-None-Match, If-Match.Link./healthcheck (optional).Vary, ETag, Cache-Control and Expires.-verbose or -debug.This is a simple (and not comprehensive) configuration:
server:
port:
http: "80"
https: "443"
tls:
cert_file: server.pem
key_file: server.key
upstream:
host: ~
port: 443
scheme: https
endpoints:
- 127.0.0.1
http_to_https: true
redirect_status_code: 301
cache:
host: localhost
domains:
example_com:
server:
upstream:
host: example.com
example_org:
server:
upstream:
host: example.org
For more details about the full server configuration check the relative documentation in docs/CONFIGURATION.md
$ go-proxy-cache -h
Usage of go-proxy-cache:
-config string
config file (default "config.yml")
-debug
enable debug
-log string
log file (default stdout)
-test
test configuration
-verbose
enable verbose
-version
display version
[...]
For examples check the relative documentation in docs/EXAMPLES.md
1.1.1, 1.1.2, 1.2.1, 1.2.3) are released as needed (no additional features are delivered in those versions, bug-fixes only).1.1.x will be supported until 1.2.0 is out).acme/autocert: server name component count invalidacme/autocert: missing certificate501 Not Implemented501 is returned.TimeoutHandler must be set to -1.context deadline exceededMIT License
Copyright (c) 2020 Fabio Cicerchia [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Content type
Image
Digest
sha256:ca4b5e939…
Size
49.4 MB
Last updated
1 day ago
docker pull fabiocicerchia/go-proxy-cache