Code Monkey home page Code Monkey logo

Comments (5)

darkweak avatar darkweak commented on June 3, 2024

Hey @p0358 I'm on it.

from souin.

darkweak avatar darkweak commented on June 3, 2024

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.

darkweak avatar darkweak commented on June 3, 2024
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.

p0358 avatar p0358 commented on June 3, 2024

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.

darkweak avatar darkweak commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.