Skip to content

Commit 8566cfd

Browse files
authored
Merge branch 'main' into dependabot/go_modules/src/golang.org/x/crypto-0.1.0
2 parents 29a8ec8 + 5621d26 commit 8566cfd

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

.github/workflows/docker-image.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,23 @@ jobs:
2323
if: success()
2424
uses: actions/[email protected]
2525
with:
26-
go-version: 1.17.x
26+
go-version: 1.18.x
2727
- name: Checkout code
2828
uses: actions/[email protected]
2929
- name: Calc coverage
3030
run: |
3131
cd src
3232
go test -v ./... -covermode=count -coverprofile=coverage.out
33-
- name: Convert coverage.out to coverage.lcov
34-
uses: jandelgado/[email protected]
35-
with:
36-
working-directory: src
33+
go get github.com/axw/gocov/gocov
34+
go get github.com/AlekSi/gocov-xml
35+
go install github.com/axw/gocov/gocov
36+
go install github.com/AlekSi/gocov-xml
37+
gocov convert coverage.out | gocov-xml > coverage.xml
3738
- name: Codecov Reports
3839
uses: codecov/[email protected]
3940
with:
4041
token: ${{ secrets.CODECOV_TOKEN }}
41-
files: src/coverage.lcov
42+
files: src/coverage.xml
4243
fail_ci_if_error: true
4344

4445
build:

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ The content must be provided from a git repository.
99
Every times an application is started, the configured repository is cloned on
1010
selected branch (in variable REPO_BRANCH) and can be pulled new version on defined PATH_PULL.
1111

12+
## RELEASE NOTES: v0.0.3-alpha
13+
14+
| Feature | Description |
15+
|---------|---------------------------------------------------|
16+
| Done | Add support to proxy redirect with HTTPS backends |
17+
| FIX | Bump golang.org/x/text from 0.3.7 to 0.3.8 |
18+
19+
20+
1221
## Authentication Methods
1322

1423
The GIT-HttpServer only support basic authentication on repositories by protocol HTTPS

src/handlers/default_handlers.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,17 @@ func ServeReverseProxy(w http.ResponseWriter, r *http.Request) {
117117
if customPath.IsRewrite() {
118118
r.URL.Path = strings.ReplaceAll(path, fmt.Sprintf("/%s", customPath.GetPath()), "")
119119
}
120+
120121
proxy := httputil.NewSingleHostReverseProxy(targetUrl)
122+
proxy.Director = func(req *http.Request) {
123+
req.Header = r.Header
124+
req.Host = targetUrl.Host
125+
req.URL.Scheme = targetUrl.Scheme
126+
req.URL.Host = targetUrl.Host
127+
req.URL.Path = r.URL.Path
128+
129+
log.Printf("Proxy to: %s \n", req.URL.String())
130+
}
121131

122132
proxy.ServeHTTP(w, r)
123133
}

0 commit comments

Comments
 (0)