Comments (5)
Hey @p0358 I'm on it.
from souin.
It works using the configuration below:
{
order cache before rewrite
cache {
api {
souin
}
}
}
http://192.168.1.10:8080 {
respond "Hello World!"
cache {
api
}
}
from souin.
curl -v -i 192.168.1.10:8080/souin-api/souin/surrogate_keys
* Trying 192.168.1.10:8080...
* Connected to 192.168.1.10 (192.168.1.10) port 8080
> GET /souin-api/souin/surrogate_keys HTTP/1.1
> Host: 192.168.1.10:8080
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Type: application/json
Content-Type: application/json
< Server: Caddy
Server: Caddy
< Date: Sat, 03 Feb 2024 20:13:55 GMT
Date: Sat, 03 Feb 2024 20:13:55 GMT
< Content-Length: 2
Content-Length: 2
<
* Connection #0 to host 192.168.1.10 left intact
{}
from souin.
Without any changes to code? I should add that my reproduction was inside of Docker, with official Caddy image, but with caddy file replaced with one built with xcaddy and using --with and this repo. Perhaps this changed something here, because networking in Docker is a tad different, I was using standard port expose, so perhaps from Docker's perspective the IP was different? But the Caddy site itself worked just okay, it was only the API that wouldn't return anything.
Sorry for forgetting to mention it was in Docker straight away...
from souin.
I didn't change anything, just used the master latest commit. But in fact even with the latest tagged version it works because it's only related to the path, not to a specific domain (domains are handled by caddy itself) and it's not listening on any specific network interface.
Your behavior is really weird, I would like to get a reproducible repository to investigate on that.
from souin.
Related Issues (20)
- 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
- 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
- souin on traefik get api souin url HOT 1
- Purging will purge surrogate_keys but it will still load cached HOT 6
- Fail to build with go < 1.21 HOT 2
- Souin doesn't cache conditional request after cache miss
- Cache-Control: stale-while-revalidate HOT 1
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.