** Cloudflare支持的端口
HTTP协议
80
8080
8880
2052
2082
2086
2095
HTTPS协议
443
2053
2083
2087
2096
8443
** Cloudflare非标准端口自动重定向
使用Cloudflare workers
export default {
async fetch(request) {
const base = "https://example.com:8443";
const statusCode = 301;
const url = new URL(request.url);
const { pathname, search } = url;
const destinationURL = `${base}${pathname}${search}`;
return Response.redirect(destinationURL, statusCode);
},
};
评论 (0)