Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-meshproxy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-meshproxy
Commits
a0ef5b12
Commit
a0ef5b12
authored
Oct 21, 2019
by
gaoshiyao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
fe313c0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/handler/proxyhandler.go
src/handler/proxyhandler.go
+5
-6
No files found.
src/handler/proxyhandler.go
View file @
a0ef5b12
...
@@ -3,7 +3,6 @@ package handler
...
@@ -3,7 +3,6 @@ package handler
import
(
import
(
"fmt"
"fmt"
"net/http"
"net/http"
"strings"
"gitlab.wodcloud.com/apaas/apaas-meshproxy/src/client"
"gitlab.wodcloud.com/apaas/apaas-meshproxy/src/client"
...
@@ -44,11 +43,11 @@ func (handler *ProxyHandler) getProxyURL(req *http.Request) string {
...
@@ -44,11 +43,11 @@ func (handler *ProxyHandler) getProxyURL(req *http.Request) string {
rawQuery
:=
req
.
URL
.
RawQuery
rawQuery
:=
req
.
URL
.
RawQuery
var
result
=
""
var
result
=
""
if
rawQuery
==
""
{
if
rawQuery
==
""
{
if
strings
.
Contains
(
path
,
".js"
)
||
strings
.
Contains
(
path
,
".html"
)
||
strings
.
Contains
(
path
,
".css"
)
||
strings
.
Contains
(
path
,
"#"
)
||
strings
.
Contains
(
path
,
".png"
)
{
//
if strings.Contains(path, ".js") || strings.Contains(path, ".html") || strings.Contains(path, ".css") || strings.Contains(path, "#") || strings.Contains(path, ".png") {
result
=
fmt
.
Sprintf
(
"http://%s%s"
,
config
.
ProxyHost
,
path
)
//
result = fmt.Sprintf("http://%s%s", config.ProxyHost, path)
}
else
{
//
} else {
result
=
fmt
.
Sprintf
(
"http://%s%s/
"
,
config
.
ProxyHost
,
path
)
result
=
fmt
.
Sprintf
(
"http://%s%s
"
,
config
.
ProxyHost
,
path
)
}
//
}
}
else
{
}
else
{
result
=
fmt
.
Sprintf
(
"http://%s%s?%s"
,
config
.
ProxyHost
,
path
,
rawQuery
)
result
=
fmt
.
Sprintf
(
"http://%s%s?%s"
,
config
.
ProxyHost
,
path
,
rawQuery
)
}
}
...
...
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