mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
fix(api): introduce gitlab proxy package
This commit is contained in:
parent
19d4db13be
commit
914b46f813
6 changed files with 62 additions and 42 deletions
19
api/http/proxy/factory/gitlab.go
Normal file
19
api/http/proxy/factory/gitlab.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package factory
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/portainer/portainer/api/http/proxy/factory/gitlab"
|
||||
)
|
||||
|
||||
func newGitlabProxy(uri string) (http.Handler, error) {
|
||||
url, err := url.Parse(uri)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
proxy := newSingleHostReverseProxyWithHostHeader(url)
|
||||
proxy.Transport = gitlab.NewTransport()
|
||||
return proxy, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue