globocom / globocom/kong-plugin-proxy-cache
X-Cache-Status is always Bypass
- Dominant language
- Lua
- Stars
- 48
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
I have the problem with kong proxy cache . in my case X-Cache-Status always "Bypass".
this is my server =>
```js
const express=require("express")
const cors=require("cors")
const app=express()
app.get("/echo",(req,res)=>{
res.setHeader('Cache-Control', 'max-age=300');
res.status(200).json({name:"rasel",age:25,sub:["bangla","english"]})
})
app.get("/remote",(req,res)=>{
res.setHeader('Cache-Control', 'max-age=300');
res.status(200).json({name:"this is remote server"})
})
app.listen(4000,()=>{
console.log("http://localhost:4000")
})
```
And this is my kong.yml file =>
```js
_format_version: "2.1"
services:
- name: echo-server
host: host.docker.internal
port: 4000
path: /echo
routes:
- name: localhost_echo_route
paths:
- /echo_server
- /echo_server2
- name: remote_server
host: host.docker.internal
port: 4000
path: /remote
routes:
- name: localhost_remote_routee
paths:
- /remote_server
- /remote_server2
# plugins
plugins:
- name: proxy-cache
config:
response_code:
- 200
request_method:
- GET
- HEAD
content_type:
- text/plain
- application/json
cache_ttl: 300
strategy: memory
cache_control: false
```
My Browser Response =>

Contributor guide
Assessment
This issue has not been assessed yet.