I have try setup a simple reverse proxy server using CAddy for my basic laravel + apache2 app
it seems whenever there is 302 ( example, login >> home ), the browser will hang and i will get 504 ( gateway timeout ).. refreshing the webpage is instant.
i have read docs and AI ( obviously this days ) and they tell us that it comes to keepalive. i have disabled it in caddy config. but it still has the same problem
caddy : 2.11.1
config :
"handle": [
{
"handler": "reverse_proxy",
"load_balancing": {
"selection_policy": {
"policy": "round_robin"
}
},
"transport": {
"dial_timeout": "5s",
"keep_alive": {
"enabled": false
},
"protocol": "http",
"response_header_timeout": "30s",
"versions": [
"1.1"
]
},
"upstreams": [
{
"dial": "x.x.x.x:80"
}
]
}
],
using one liner of caddy
sudo caddy reverse-proxy --from :80 --to x.x.x.x:80
works perfectly