mirror of
https://github.com/documize/community.git
synced 2025-07-19 21:29:42 +02:00
add proxy support when communicate with plantuml
This commit is contained in:
parent
4fe022aa0c
commit
4e0218f5ea
1 changed files with 3 additions and 0 deletions
|
@ -102,9 +102,12 @@ func (p *Provider) generateDiagram(ctx *provider.Context, data string) string {
|
||||||
org, _ := p.Store.Organization.GetOrganization(ctx.Request, ctx.OrgID)
|
org, _ := p.Store.Organization.GetOrganization(ctx.Request, ctx.OrgID)
|
||||||
|
|
||||||
var transport = &http.Transport{
|
var transport = &http.Transport{
|
||||||
|
Proxy: http.ProxyFromEnvironment,
|
||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
InsecureSkipVerify: true, // TODO should be glick.InsecureSkipVerifyTLS (from -insecure flag) but get error: x509: certificate signed by unknown authority
|
InsecureSkipVerify: true, // TODO should be glick.InsecureSkipVerifyTLS (from -insecure flag) but get error: x509: certificate signed by unknown authority
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
client := &http.Client{Transport: transport}
|
client := &http.Client{Transport: transport}
|
||||||
|
|
||||||
resp, _ := client.Post(org.ConversionEndpoint+"/api/plantuml", "application/text; charset=utf-8", bytes.NewReader([]byte(data)))
|
resp, _ := client.Post(org.ConversionEndpoint+"/api/plantuml", "application/text; charset=utf-8", bytes.NewReader([]byte(data)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue