Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chart-server
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bruce Flynn
chart-server
Commits
909508cb
Commit
909508cb
authored
6 years ago
by
Bruce Flynn
Browse files
Options
Downloads
Patches
Plain Diff
fix bad pat
parent
19ea4701
Branches
main
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+1
-0
1 addition, 0 deletions
Dockerfile
main.go
+2
-2
2 additions, 2 deletions
main.go
with
3 additions
and
2 deletions
Dockerfile
+
1
−
0
View file @
909508cb
...
...
@@ -7,6 +7,7 @@ COPY . .
RUN
dep ensure
&&
./build.sh
FROM
debian:buster-slim
COPY
--from=build /go/bin/chart-server .
ENTRYPOINT
["./chart-server"]
...
...
This diff is collapsed.
Click to expand it.
main.go
+
2
−
2
View file @
909508cb
...
...
@@ -38,7 +38,7 @@ func handleUpload(w http.ResponseWriter, r *http.Request) {
http
.
Error
(
w
,
"InternalServerError"
,
http
.
StatusInternalServerError
)
return
}
// got a stat result, file must exist
// got a stat result, file must exist
already and we should not overwrite
if
st
!=
nil
{
http
.
Error
(
w
,
"File exists"
,
http
.
StatusForbidden
)
return
...
...
@@ -173,7 +173,7 @@ Options can also be specified as environment variables $CHART_SVR_<name>
r
.
HandleFunc
(
"/status"
,
handleStatus
)
.
Methods
(
"GET"
)
// Limit to only index.yaml and chart (.tgz) files
r
.
HandleFunc
(
`/{filename:(?:index.yaml|.*-.*.tgz)}`
,
handleGetFile
)
.
Methods
(
"GET"
)
r
.
HandleFunc
(
`/{chart:.*-.*
\
.tgz}`
,
handleUpload
)
.
Methods
(
"PUT"
)
r
.
HandleFunc
(
`/{chart:.*-.*.tgz}`
,
handleUpload
)
.
Methods
(
"PUT"
)
r
.
HandleFunc
(
"/"
,
handleGetHome
)
h
:=
handlers
.
CombinedLoggingHandler
(
os
.
Stdout
,
handlers
.
CORS
()(
r
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment