Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.6版本自带的swagger不能被其他IP访问 #1897

Closed
mijjjj opened this issue Jun 8, 2022 · 10 comments
Closed

2.0.6版本自带的swagger不能被其他IP访问 #1897

mijjjj opened this issue Jun 8, 2022 · 10 comments

Comments

@mijjjj
Copy link

mijjjj commented Jun 8, 2022

使用2.0.6版本并配置了swagger,本地打开正常,本地其他ip打开不了,后端显示200

配置文件
server:
address: ":8201"
serverRoot: "resource/public"
dumpRouterMap: true
routeOverWrite: true
openapiPath: "/api.json"
swaggerPath: "/swagger"
NameToUriType: 3
maxHeaderBytes: "20KB"
clientMaxBodySize: "50MB"

Logging配置

logPath: "resource/log/server" # 日志文件存储目录路径,建议使用绝对路径。默认为空,表示关闭
logStdout: true # 日志是否输出到终端。默认为true
errorStack: true # 当Server捕获到异常时是否记录堆栈信息到日志中。默认为true
errorLogEnabled: true # 是否记录异常日志信息到日志中。默认为true
errorLogPattern: "error-{Ymd}.log" # 异常错误日志文件格式。默认为"error-{Ymd}.log"
accessLogEnabled: true # 是否记录访问日志。默认为false
accessLogPattern: "access-{Ymd}.log" # 访问日志文件格式。默认为"access-{Ymd}.log"

访问不了显示
image

正常访问显示
image

@mingzaily
Copy link
Member

是空白页面吗?

@mijjjj
Copy link
Author

mijjjj commented Jun 16, 2022

是空白页,标头出来了,但是一直在转圈圈,像是请求到了没返回

@mijjjj
Copy link
Author

mijjjj commented Jun 16, 2022

8021其他接口局域网内返回正常

@mingzaily
Copy link
Member

嗯,这边偶尔会出现,也是等待一两分钟后正常,预估是css加载时间比较久

@mijjjj
Copy link
Author

mijjjj commented Jun 16, 2022

试过几次,放了好几分钟也没反应,局域网会出现这样。本机访问就不会

@mingzaily
Copy link
Member

本机估计清一下缓存也会,可以尝试访问下 /api.json看看,如果api.json正常,那确实是样式加载时间太长了,可以试试FQ

@mijjjj
Copy link
Author

mijjjj commented Jun 16, 2022

api.json打不开

@mijjjj
Copy link
Author

mijjjj commented Jun 16, 2022

本机请缓存或者开无痕的话会稍微慢一点,但是其他机器就访问不了

@mingzaily
Copy link
Member

那可能需要检查一下系统防火墙设置了

@houseme
Copy link
Member

houseme commented Jun 24, 2022

拉新版本看看,原来js的 cdn 被墙了。或许查查局域网防火墙

@houseme houseme closed this as completed Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants