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
e3d44b8b
Commit
e3d44b8b
authored
Oct 24, 2019
by
gaoshiyao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新路由设置
parent
72d0e257
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
build/dockerfile
build/dockerfile
+1
-1
src/handler/proxyhandler.go
src/handler/proxyhandler.go
+2
-0
No files found.
build/dockerfile
View file @
e3d44b8b
...
...
@@ -3,4 +3,4 @@ MAINTAINER {{ AUTHOR }}
LABEL
Author={{ AUTHOR }} Name={{ PROJECT }} Version={{ VERSION }}
COPY
./dist/. /app
EXPOSE
80
ENTRYPOINT
["/app/proxy", "--port=80"]
ENTRYPOINT
["/app/proxy", "--port=80"
,"--prefix=test"
]
src/handler/proxyhandler.go
View file @
e3d44b8b
...
...
@@ -2,6 +2,7 @@ package handler
import
(
"fmt"
"github.com/sirupsen/logrus"
"net/http"
"strings"
...
...
@@ -29,6 +30,7 @@ func CreateProxyHandler() (*ProxyHandler, error) {
var
ch
chan
bool
func
(
handler
*
ProxyHandler
)
ServeHTTP
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
logrus
.
Info
(
"===>"
,
req
.
URL
)
if
err
:=
count
();
err
!=
nil
{
fmt
.
Println
(
err
.
Error
())
w
.
Write
([]
byte
(
"缓存计数失败!"
))
...
...
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