File tree Expand file tree Collapse file tree 3 files changed +10
-13
lines changed
Expand file tree Collapse file tree 3 files changed +10
-13
lines changed Original file line number Diff line number Diff line change 11# build stage
2- FROM quay.io/fedora/fedora:34-x86_64 AS build
3- WORKDIR /app
4- RUN sudo dnf install -y git golang
5-
6- RUN git clone https://github.com/yaacov/oc-gate.git /app \
7- && git clone https://github.com/novnc/noVNC /app/web/public/noVNC \
8- && go get github.com/yaacov/oc-gate/cmd/oc-gate \
9- && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /app/ /app/cmd/oc-gate/
2+ FROM golang:1.15 AS build
103
11- # deploy stage
4+ WORKDIR /app
5+ COPY . .
126
13- # quay does not have an alpine image,
14- # an option is to switch to using fedora-minimal
15- # another option is to use alpine (only from dockerhub)
7+ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o /app/ /app/cmd/...
168
179# FROM quay.io/fedora/fedora-minimal:34-x86_64
1810FROM alpine
Original file line number Diff line number Diff line change 4343
4444.PHONY : image
4545image :
46- podman build -t yaacov/oc-gate ./deploy
46+ podman build -t yaacov/oc-gate .
4747 podman tag yaacov/oc-gate quay.io/yaacov/oc-gate
4848 # podman push quay.io/yaacov/oc-gate
Original file line number Diff line number Diff line change @@ -121,6 +121,11 @@ func (s Server) AuthMiddleware(next http.Handler) http.Handler {
121121 // Log request
122122 log .Printf ("%s %v: %+v" , r .RemoteAddr , r .Method , r .URL )
123123
124+ if r .URL .Path == "/login.html" {
125+ next .ServeHTTP (w , r )
126+ return
127+ }
128+
124129 // Get request token from Authorization header and session cookie
125130 token , _ := s .GetRequestToken (w , r )
126131
You can’t perform that action at this time.
0 commit comments