{
# 路由规则 route / { # 跨域需要加的请求头 header Access-Control-Allow-Origin * header Access-Control-Allow-Methods GET, POST, OPTIONS header Access-Control-Allow-Headers 'authorization,Authorization,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'

    # OPTIONS 请求直接返回 204
    @options {
        method OPTIONS
    }
    respond @options 204
    
    # tp需要加的伪静态
    @notfound {
        not file {path}
    }
    rewrite @notfound /index.php?s={uri}
}

}


原文地址: https://www.cveoy.top/t/topic/nS2o 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录