Parameter redirection

1. The problem I’m having:

Currently, there is a website that is operating normally, the URL is https://hertzbeat.taiwan-homecloud.work.gd/status

However, when I type https://hertzbeat.taiwan-homecloud.work.gd/status?%, it redirects to the login page.

Obviously, this is not what I want, How should I modify the configuration file?

thank you.

2. Error messages and/or full log output:

2024/03/16 11:51:36.160	DEBUG	events	event	{"name": "tls_get_certificate", "id": "4fb8b738-f72e-4bc3-aae1-7924b78b1b85", "origin": "tls", "data": {"client_hello":{"CipherSuites":[4865,4867,4866,49195,49199,52393,52392,49196,49200,49162,49161,49171,49172,156,157,47,53],"ServerName":"hertzbeat.taiwan-homecloud.work.gd","SupportedCurves":[29,23,24,25,256,257],"SupportedPoints":"AA==","SignatureSchemes":[1027,1283,1539,2052,2053,2054,1025,1281,1537,515,513],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[772,771],"RemoteAddr":{"IP":"192.168.10.1","Port":10167,"Zone":""},"LocalAddr":{"IP":"172.18.0.13","Port":443,"Zone":""}}}}
2024/03/16 11:51:36.161	DEBUG	tls.handshake	default certificate selection results	{"identifier": "hertzbeat.taiwan-homecloud.work.gd", "subjects": ["hertzbeat.taiwan-homecloud.work.gd"], "managed": true, "issuer_key": "acme.zerossl.com-v2-DV90", "hash": "dd8e1c070784fb00631b38fb18906f3c951d5ee687b4e7aa20af666b7652fd2b"}
2024/03/16 11:51:36.161	DEBUG	tls.handshake	matched certificate in cache	{"remote_ip": "192.168.10.1", "remote_port": "10167", "subjects": ["hertzbeat.taiwan-homecloud.work.gd"], "managed": true, "expiration": "2024/06/14 00:00:00.000", "hash": "dd8e1c070784fb00631b38fb18906f3c951d5ee687b4e7aa20af666b7652fd2b"}
2024/03/16 11:51:36.192	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.002720562, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/status", "headers": {"X-Forwarded-For": ["192.168.10.1"], "Sec-Fetch-Mode": ["navigate"], "Sec-Fetch-Dest": ["document"], "Referer": ["https://caddy.community/"], "Upgrade-Insecure-Requests": ["1"], "Te": ["trailers"], "Sec-Fetch-Site": ["cross-site"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "X-Forwarded-Proto": ["https"], "Sec-Fetch-User": ["?1"], "Accept-Encoding": ["gzip, deflate, br"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"], "Accept-Language": ["zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Date": ["Sat, 16 Mar 2024 11:51:36 GMT"], "Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Content-Type": ["text/html"], "Content-Language": ["zh-TW"]}, "status": 404}
2024/03/16 11:51:36.564	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.002105391, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/assets/app-data.json", "headers": {"Accept-Language": ["zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Fetch-Dest": ["empty"], "Sec-Fetch-Mode": ["cors"], "Referer": ["https://hertzbeat.taiwan-homecloud.work.gd/status"], "Te": ["trailers"], "Accept": ["application/json, text/plain, */*"], "Cache-Control": ["no-cache"], "Sec-Fetch-Site": ["same-origin"], "If-Modified-Since": ["Tue, 05 Mar 2024 08:36:55 GMT"], "X-Forwarded-For": ["192.168.10.1"], "X-Forwarded-Proto": ["https"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Last-Modified": ["Tue, 05 Mar 2024 08:36:55 GMT"], "Date": ["Sat, 16 Mar 2024 11:51:36 GMT"]}, "status": 304}
2024/03/16 11:51:36.566	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.004382143, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/api/apps/hierarchy", "headers": {"User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Fetch-Dest": ["empty"], "Te": ["trailers"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "Accept-Language": ["zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"], "Sec-Fetch-Mode": ["cors"], "Accept": ["application/json, text/plain, */*"], "X-Forwarded-For": ["192.168.10.1"], "X-Forwarded-Proto": ["https"], "Sec-Fetch-Site": ["same-origin"], "Referer": ["https://hertzbeat.taiwan-homecloud.work.gd/status"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Content-Type": ["application/json"], "Date": ["Sat, 16 Mar 2024 11:51:36 GMT"]}, "status": 200}
2024/03/16 11:51:37.515	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.001994881, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/assets/i18n/zh-TW.json", "headers": {"Accept-Encoding": ["gzip, deflate, br"], "X-Forwarded-For": ["192.168.10.1"], "Sec-Fetch-Dest": ["empty"], "If-Modified-Since": ["Tue, 05 Mar 2024 08:36:55 GMT"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "Referer": ["https://hertzbeat.taiwan-homecloud.work.gd/status"], "X-Forwarded-Proto": ["https"], "Accept-Language": ["zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"], "Sec-Fetch-Site": ["same-origin"], "Te": ["trailers"], "Accept": ["application/json, text/plain, */*"], "Cache-Control": ["no-cache"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "Sec-Fetch-Mode": ["cors"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Last-Modified": ["Tue, 05 Mar 2024 08:36:55 GMT"], "Date": ["Sat, 16 Mar 2024 11:51:37 GMT"]}, "status": 304}
2024/03/16 11:51:37.518	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.003999943, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/api/i18n/zh-TW", "headers": {"Accept": ["application/json, text/plain, */*"], "Referer": ["https://hertzbeat.taiwan-homecloud.work.gd/status"], "Sec-Fetch-Mode": ["cors"], "Sec-Fetch-Site": ["same-origin"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Fetch-Dest": ["empty"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "X-Forwarded-For": ["192.168.10.1"], "Te": ["trailers"], "Accept-Language": ["zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"], "X-Forwarded-Proto": ["https"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Content-Type": ["application/json"], "Date": ["Sat, 16 Mar 2024 11:51:37 GMT"], "Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"]}, "status": 200}
2024/03/16 11:51:37.578	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.001659791, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/api/status/page/public/org", "headers": {"Sec-Fetch-Mode": ["cors"], "Sec-Fetch-Site": ["same-origin"], "Te": ["trailers"], "X-Forwarded-For": ["192.168.10.1"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"], "Accept-Language": ["zh-TW"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Fetch-Dest": ["empty"], "X-Forwarded-Proto": ["https"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "Accept": ["application/json, text/plain, */*"], "Referer": ["https://hertzbeat.taiwan-homecloud.work.gd/status"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Date": ["Sat, 16 Mar 2024 11:51:37 GMT"], "Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Content-Type": ["application/json"]}, "status": 200}
2024/03/16 11:51:37.623	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.004848444, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/api/status/page/public/component", "headers": {"Te": ["trailers"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "Accept-Encoding": ["gzip, deflate, br"], "X-Forwarded-Proto": ["https"], "Sec-Fetch-Mode": ["cors"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "Referer": ["https://hertzbeat.taiwan-homecloud.work.gd/status"], "X-Forwarded-For": ["192.168.10.1"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"], "Sec-Fetch-Dest": ["empty"], "Accept": ["application/json, text/plain, */*"], "Sec-Fetch-Site": ["same-origin"], "Accept-Language": ["zh-TW"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Content-Type": ["application/json"], "Date": ["Sat, 16 Mar 2024 11:51:37 GMT"]}, "status": 200}
2024/03/16 11:51:45.105	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.002969872, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/status?%", "headers": {"Upgrade-Insecure-Requests": ["1"], "X-Forwarded-For": ["192.168.10.1"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"], "Sec-Fetch-Dest": ["document"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"], "Sec-Fetch-Site": ["none"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "Accept-Language": ["zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"], "Sec-Fetch-User": ["?1"], "Accept-Encoding": ["gzip, deflate, br"], "X-Forwarded-Proto": ["https"], "Sec-Fetch-Mode": ["navigate"], "Te": ["trailers"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Date": ["Sat, 16 Mar 2024 11:51:45 GMT"], "Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Content-Type": ["text/html"], "Content-Language": ["zh-TW"]}, "status": 404}
2024/03/16 11:51:45.583	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.00123677, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/assets/app-data.json", "headers": {"X-Forwarded-Proto": ["https"], "Sec-Fetch-Mode": ["cors"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "Accept": ["application/json, text/plain, */*"], "Accept-Encoding": ["gzip, deflate, br"], "Referer": ["https://hertzbeat.taiwan-homecloud.work.gd/status?%"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"], "Sec-Fetch-Dest": ["empty"], "If-Modified-Since": ["Tue, 05 Mar 2024 08:36:55 GMT"], "Sec-Fetch-Site": ["same-origin"], "Accept-Language": ["zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "X-Forwarded-For": ["192.168.10.1"], "Te": ["trailers"], "Cache-Control": ["no-cache"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Last-Modified": ["Tue, 05 Mar 2024 08:36:55 GMT"], "Date": ["Sat, 16 Mar 2024 11:51:45 GMT"]}, "status": 304}
2024/03/16 11:51:45.584	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.002506801, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/api/apps/hierarchy", "headers": {"Sec-Fetch-Mode": ["cors"], "Accept": ["application/json, text/plain, */*"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Fetch-Site": ["same-origin"], "Accept-Language": ["zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"], "X-Forwarded-For": ["192.168.10.1"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"], "X-Forwarded-Proto": ["https"], "Te": ["trailers"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "Referer": ["https://hertzbeat.taiwan-homecloud.work.gd/status?%"], "Sec-Fetch-Dest": ["empty"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Content-Type": ["application/json"], "Date": ["Sat, 16 Mar 2024 11:51:45 GMT"]}, "status": 200}
2024/03/16 11:51:45.611	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.00114063, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/assets/i18n/zh-TW.json", "headers": {"Referer": ["https://hertzbeat.taiwan-homecloud.work.gd/status?%"], "Sec-Fetch-Site": ["same-origin"], "Accept": ["application/json, text/plain, */*"], "Cache-Control": ["no-cache"], "Sec-Fetch-Mode": ["cors"], "Accept-Language": ["zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Fetch-Dest": ["empty"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"], "If-Modified-Since": ["Tue, 05 Mar 2024 08:36:55 GMT"], "Te": ["trailers"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "X-Forwarded-For": ["192.168.10.1"], "X-Forwarded-Proto": ["https"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Last-Modified": ["Tue, 05 Mar 2024 08:36:55 GMT"], "Date": ["Sat, 16 Mar 2024 11:51:45 GMT"]}, "status": 304}
2024/03/16 11:51:45.615	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.002967642, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/api/i18n/zh-TW", "headers": {"Sec-Fetch-Dest": ["empty"], "Te": ["trailers"], "Accept": ["application/json, text/plain, */*"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Fetch-Site": ["same-origin"], "X-Forwarded-Proto": ["https"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"], "Accept-Language": ["zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"], "Referer": ["https://hertzbeat.taiwan-homecloud.work.gd/status?%"], "X-Forwarded-For": ["192.168.10.1"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "Sec-Fetch-Mode": ["cors"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Date": ["Sat, 16 Mar 2024 11:51:45 GMT"], "Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Content-Type": ["application/json"]}, "status": 200}
2024/03/16 11:51:45.704	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.10.253:1157", "duration": 0.001091821, "request": {"remote_ip": "192.168.10.1", "remote_port": "10167", "client_ip": "192.168.10.1", "proto": "HTTP/2.0", "method": "GET", "host": "hertzbeat.taiwan-homecloud.work.gd", "uri": "/assets/brand.svg", "headers": {"Accept-Language": ["zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3"], "X-Forwarded-For": ["192.168.10.1"], "User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"], "Te": ["trailers"], "Accept": ["image/avif,image/webp,*/*"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Mode": ["no-cors"], "Alt-Used": ["hertzbeat.taiwan-homecloud.work.gd"], "Referer": ["https://hertzbeat.taiwan-homecloud.work.gd/passport/login"], "X-Forwarded-Proto": ["https"], "Accept-Encoding": ["gzip, deflate, br"], "X-Forwarded-Host": ["hertzbeat.taiwan-homecloud.work.gd"], "Sec-Fetch-Dest": ["image"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "hertzbeat.taiwan-homecloud.work.gd"}}, "headers": {"Date": ["Sat, 16 Mar 2024 11:51:45 GMT"], "Vary": ["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"], "Last-Modified": ["Tue, 05 Mar 2024 08:36:55 GMT"], "Accept-Ranges": ["bytes"], "Content-Type": ["image/svg+xml"], "Content-Length": ["9046"]}, "status": 200}


3. Caddy version:

v2.7.6

4. How I installed and ran Caddy:

a. System environment:

b. Command:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

c. Service/unit/compose file:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

d. My complete Caddy config:

hertzbeat.taiwan-homecloud.work.gd {
	log {
    	output file /data/logs/hertzbeat.log {
			roll_size 9mb
			roll_keep 3
			roll_keep_for 720h
			roll_local_time
		}
		import log_format
    }
	encode zstd gzip
	redir / /status
	redir /login /status
	redir /passport/login /status
	handle /status {
		reverse_proxy 192.168.10.253:1157 {
   			flush_interval -1
  		}
	}
	handle /assets* {
		reverse_proxy 192.168.10.253:1157 {
   			flush_interval -1
  		}
	}
	handle /*.js {
		reverse_proxy 192.168.10.253:1157 {
   			flush_interval -1
  		}
	}
	handle /*.css {
		reverse_proxy 192.168.10.253:1157 {
   			flush_interval -1
  		}
	}
	handle /api* {
		reverse_proxy 192.168.10.253:1157 {
   			flush_interval -1
  		}
	}
}

5. Links to relevant resources:

You can simplify all this:

	@proxy path /status /assets* /*.js /*.css /api*
	handle @proxy {
		reverse_proxy 192.168.10.253:1157 {
   			flush_interval -1
  		}
	}

Your upstream app is responding with a 404 status. That’s a problem with your upstream, not with Caddy.

Thank you for your response. I understand it’s not a Caddy issue. I just want to know if Caddy has a way to handle 404 errors, like redirecting to a status page.

For intercepting responses from upstream you can use the handle_response subdirective of reverse_proxy: reverse_proxy (Caddyfile directive) — Caddy Documentation (also see the examples at the bottom of the page)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.