Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
c33b2525
Commit
c33b2525
authored
Oct 28, 2019
by
whl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决swagger访问异常的解决
parent
c858d449
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
bsoft-tools/nginx/nginx.conf
+2
-14
No files found.
bsoft-tools/nginx/nginx.conf
View file @
c33b2525
...
@@ -13,20 +13,6 @@ http {
...
@@ -13,20 +13,6 @@ http {
sendfile
on
;
sendfile
on
;
keepalive_timeout
65
;
keepalive_timeout
65
;
server
{
listen
80
;
server_name
localhost
;
location
/
{
root
html
;
index
index.html
index.htm
;
}
error_page
500
502
503
504
/50x.html
;
location
=
/50x.html
{
root
html
;
}
}
server
{
server
{
listen
8080
;
listen
8080
;
...
@@ -46,6 +32,8 @@ http {
...
@@ -46,6 +32,8 @@ http {
add_header
'Access-Control-Allow-Methods'
'GET,POST'
;
add_header
'Access-Control-Allow-Methods'
'GET,POST'
;
# 获取请求的host
# 获取请求的host
proxy_set_header
Host
$host
;
proxy_set_header
Host
$host
;
# 获取请求的port(为解决swagger调用接口用)
proxy_set_header
X-Forwarded-Port
83
;
# 获取请求的ip地址
# 获取请求的ip地址
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Real-IP
$remote_addr
;
# 获取请求的多级ip地址,当请求经过多个反向代理时,会获取多个ip,英文逗号隔开
# 获取请求的多级ip地址,当请求经过多个反向代理时,会获取多个ip,英文逗号隔开
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment