Skip to content

Commit

Permalink
feat(docs): Update documentation and tagging. Add more renovate features
Browse files Browse the repository at this point in the history
  • Loading branch information
j0sh3rs committed Jul 13, 2022
1 parent fd5d08b commit bc15e3e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:
files: |
go.*
main.go
*goreleaser*
*Dockerfile
- name: Bump version and push tag
if: steps.changed_files.outputs.any_changed == 'true'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ the required values. Now you can run the cfaccess-proxy container with the follo

```
cp .env.template .env
docker run --rm -d --env-file $(pwd)/.env --name cfaccess-proxy -p 3001:3001 j0sh3rs/cfaccess-proxy
docker run --rm -d --env-file $(pwd)/.env --name cfaccess-proxy -p 3001:3001 ghcr.io/j0sh3rs/cfaccess-proxy
```

This will start the proxy on the specified address and it will start to listen for incoming requests.
Expand Down
14 changes: 7 additions & 7 deletions deploy/kubernetes/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ spec:
app: cfaccess-proxy
spec:
containers:
- image: j0sh3rs/cfaccess-proxy
- image: ghcr.io/j0sh3rs/cfaccess-proxy
name: cfaccess-proxy
ports:
- containerPort: 3001
- containerPort: 80
env:
- name: AUTHDOMAIN
value: https://<your-own-domain>.cloudflareaccess.com
Expand All @@ -32,9 +32,9 @@ spec:
- name: FORWARDEMAILHEADER
value: X-WEBAUTH-EMAIL
- name: FORWARDHOST
value: <grafana-host>:3000
value: <downstream-host>:<port>
- name: ADDR
value: :3001
value: :80
restartPolicy: Always
---
apiVersion: v1
Expand All @@ -46,8 +46,8 @@ metadata:
namespace: monitoring
spec:
ports:
- name: "3001"
port: 3001
targetPort: 3001
- name: http
port: 80
targetPort: 80
selector:
app: cfaccess-proxy
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/golang/protobuf v1.5.2 // indirect
github.com/stretchr/testify v1.6.1 // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
golang.org/x/net v0.0.0-20220630215102-69896b714898 // indirect
golang.org/x/net v0.0.0-20220708220712-1185a9018129 // indirect
golang.org/x/oauth2 v0.0.0-20220630143837-2104d58473e0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR
golang.org/x/net v0.0.0-20200505041828-1ed23360d12c/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20220630215102-69896b714898 h1:K7wO6V1IrczY9QOQ2WkVpw4JQSwCd52UsxVEirZUfiw=
golang.org/x/net v0.0.0-20220630215102-69896b714898/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220708220712-1185a9018129 h1:vucSRfWwTsoXro7P+3Cjlr6flUMtzCwzlvkxEQtHHB0=
golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20220630143837-2104d58473e0 h1:VnGaRqoLmqZH/3TMLJwYCEWkR4j1nuIU1U9TvbqsDUw=
golang.org/x/oauth2 v0.0.0-20220630143837-2104d58473e0/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
Expand Down
6 changes: 2 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2020 Jorge Luis Betancourt <github@jorgelbg.me>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Expand Down Expand Up @@ -87,7 +85,7 @@ func VerifyToken(next http.Handler, tokenVerifier *oidc.IDTokenVerifier, cfg *Co
r.Header.Add(cfg.ForwardEmailHeader, claims.Email)
r.Header.Add(cfg.ForwardUserHeader, u)
log.Printf("Authenticated as: %s", claims.Email)
log.Printf("Username extracted as: %s", u)
// log.Printf("Username extracted as: %s", u)

next.ServeHTTP(w, r)
}
Expand All @@ -114,7 +112,7 @@ func main() {

director := func(req *http.Request) {
req.Header.Add("X-Forwarded-Host", req.Host)
req.Header.Add("X-Origin-Host", "cloudflare-access-proxy")
req.Header.Add("X-Origin-Host", "cfaccess-proxy")
// TODO: should we trust on the Schema of the original request?
req.URL.Scheme = "http"

Expand Down
6 changes: 4 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
":enableRenovate",
"config:base",
":disableRateLimiting",
":dependencyDashboard",
":separatePatchReleases",
"docker:enableMajor",
":enablePreCommit",
"github>j0sh3rs/cfaccess-proxy//.github/renovate/autoMerge",
":rebaseStalePrs",
":automergeMinor",
":gomod",
":docker",
"github>j0sh3rs/cfaccess-proxy//.github/renovate/labels"
],
"platform": "github",
Expand Down

0 comments on commit bc15e3e

Please sign in to comment.