Comments (6)
I do not actively maintain the standalone server because of the multiple constraints to built a reverse proxy. I recommend to use Souin as middleware in caddy or traefik reverse proxy. However I will investigate on that panic but in my first opinion, the Souin standalone server is designed to run in front of another reverse proxy (Apache, nginx, caddy, Træfik, ...). You cannot proxy directly to google but you should have something like
Incoming traffic -> Souin -> traefik -> service
and your Souin configuration should be
default_cache:
ttl: 30s
reverse_proxy: http://traefik
from souin.
What's the difference in terms of having a "local (maybe virtual) network" upstream (traefik) vs. a remote upstream (google)?
Anyhow, if the standalone server is not maintained maybe it should be made more clear in the readme? By reading here: https://github.com/darkweak/souin#souin-out-of-the-box and seeing otherwise just use https://yourdomain.com
I assume differently.
from souin.
Træfik is a reverse proxy, Souin is not. yourdomain.com
is the domain to use to contact the reverse proxy and transfer the request to it.
from souin.
I've added traefik as you suggested. I'm no expert in the service so I followed and adapted the basic example found on the traefik docs.
Panic is still there.
version: "3.7"
services:
proxy:
image: darkweak/souin:v1.6.28
ports:
- 80:80
- 443:443
volumes:
- ./configuration/configuration.yml:/configuration/configuration.yml
traefik:
image: "traefik:v2.9"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
whoami:
image: "traefik/whoami"
container_name: "simple-service"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`localhost`)"
- "traefik.http.routers.whoami.entrypoints=web"
log_level: DEBUG
default_cache: # Required part
port: # Ports to expose Souin
web: 80
tls: 443
ttl: 10s # Default TTL
reverse_proxy_url: 'http://traefik'
(EDIT: I've also tried downgrading Souin, that's why I'm using 1.6.28 here)
I'll explore using souin as a middleware.
from souin.
That's a bug then 😅
from souin.
Well I opened a PR that handle HTTP proxy errors. In your case, you have to put a real proxy between your souin instance and the service you want to proxy the request (caddy is easier to configure for that). If you target http://google.com
or http://www.google.com
it will work because there are no TLS verifications and it's not on the roadmap to support that.
I can come back later with an example using caddy if you need it.
from souin.
Related Issues (20)
- [Traefik Plugin Catalog] Plugin Analyzer has detected a problem.
- [Traefik plugin] panic after deploy (docker service update) and when doing Apache AB test HOT 15
- Prometheus metrics not incrementing HOT 2
- Add support for in-memory NutsDB HOT 1
- fatal error: concurrent map writes HOT 2
- mode bypass is ignored in global caddy config HOT 1
- Can't be built with FrankenPHP on amd64 HOT 1
- Redis keys not expiring HOT 13
- public,max-age=31536000, immutable HOT 2
- Nginx / apache example HOT 2
- Which one to use with caddy? HOT 2
- Better explanation on mode option HOT 1
- Cache corruption HOT 14
- New cache engine, implementation rueidis
- panic in Caddy plugin HOT 4
- order cache before rewrite - question HOT 1
- API doesn't work if Caddy's hostname is in format of `http://10.0.0.1:8080` rather than `:8080` HOT 5
- Feature request: customization of cache key HOT 8
- Surrogate keys API seems broken with multiple sites HOT 7
- Redis stops working after a short moment? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from souin.