1. My Caddy version (caddy version
):
v2.0.0-rc.3
2. How I run Caddy:
I was setting up a reverse proxy for my favourite game canto.world-of-dungeons.org
as some of my friends complained about the bad server connection. So I set up a simple Caddy reverse proxy on my VPS with domain name canto.wannaexpresso.com
, but after I logged in I couldn’t do anything as the game alerts ‘please enable cookie’.
I thought the problem was with set-cookie after I read an article on nginx reverse proxy which suggested sending and receiving Set-Cookie with the correct domain, that is, sending original domain set-cookie to canto.world-of-dungeons.org
and returning canto.wannaexpresso.com
set-cookie to browser.
So I tried setting header_up in Caddyfile with replacements, but the set-cookie turned from
world=CC; expires=Sat, 01-Aug-2020 01:11:00 GMT; path=/; domain=world-of-dungeons.org
to
wannaexpresso.comwwannaexpresso.comowannaexpresso.comrwannaexpresso.comlwannaexpresso.comdwannaexpresso.com=wannaexpresso.comCwannaexpresso.comCwannaexpresso.com;wannaexpresso.com wannaexpresso.comewannaexpresso.comxwannaexpresso.compwannaexpresso.comiwannaexpresso.comrwannaexpresso.comewannaexpresso.comswannaexpresso.com=wannaexpresso.comSwannaexpresso.comawannaexpresso.comtwannaexpresso.com,wannaexpresso.com wannaexpresso.com0wannaexpresso.com1wannaexpresso.com-wannaexpresso.comAwannaexpresso.comuwannaexpresso.comgwannaexpresso.com-wannaexpresso.com2wannaexpresso.com0wannaexpresso.com2wannaexpresso.com0wannaexpresso.com wannaexpresso.com0wannaexpresso.com1wannaexpresso.com:wannaexpresso.com1wannaexpresso.com1wannaexpresso.com:wannaexpresso.com0wannaexpresso.com0wannaexpresso.com wannaexpresso.comGwannaexpresso.comMwannaexpresso.comTwannaexpresso.com;wannaexpresso.com wannaexpresso.compwannaexpresso.comawannaexpresso.comtwannaexpresso.comhwannaexpresso.com=wannaexpresso.com/wannaexpresso.com;wannaexpresso.com wannaexpresso.comdwannaexpresso.comowannaexpresso.commwannaexpresso.comawannaexpresso.comiwannaexpresso.comnwannaexpresso.com=wannaexpresso.comwwannaexpresso.comowannaexpresso.comrwannaexpresso.comlwannaexpresso.comdwannaexpresso.com-wannaexpresso.comowannaexpresso.comfwannaexpresso.com-wannaexpresso.comdwannaexpresso.comuwannaexpresso.comnwannaexpresso.comgwannaexpresso.comewannaexpresso.comowannaexpresso.comnwannaexpresso.comswannaexpresso.com.wannaexpresso.comowannaexpresso.comrwannaexpresso.comgwannaexpresso.com
I think I probably need a fix on the replacement statements. Please help me orz…
a. System environment:
Debian 10
b. Command:
caddy run
c. My complete Caddyfile or JSON config:
# My Caddyfile
canto.wannaexpresso.com {
encode gzip
reverse_proxy * http://canto.world-of-dungeons.org {
header_up Host canto.world-of-dungeons.org
header_up Set-Cookie wannaexpresso.com world-of-dungeons.org
header_down Set-Cookie world-of-dungeons.org wannaexpresso.com
}
}