You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
(CORS) {
@origin header Origin {args.0}
header @origin Access-Control-Allow-Origin " {args.0} "
header @origin Access-Control-Allow-Methods "OPTIONS,HEAD,GET,POST,PUT,PATCH,DELETE"
}
:8300 {
encode zstd gzip
# 优先处理后端请求
handle _path /stage-api/* {
import CORS
uri strip_prefix /stage-api
# 需要代理到的IP以及端口号
reverse_proxy ruoyi-admin : 8080
}
handle {
root * /data/dist
# Vue Router history模式, 避免刷新后404页面; 字符中间不可有空格
try_files {path} .html {path} /index.html
file_server
}
log {
format formatted "[ {ts} ] { request>remote_addr } { request>proto } { request>method } <- {status} -> { request>host } { request>uri } { request>headers>User-Agent>[0 ] } " {
time_format "iso8601"
}
output file "/dev/stdout"
}
}