1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 05:09:42 +02:00

add proxy support when communicate with plantuml

This commit is contained in:
Di_Moon 2020-08-14 11:54:30 +03:00
parent 4fe022aa0c
commit 4e0218f5ea

View file

@ -102,9 +102,12 @@ func (p *Provider) generateDiagram(ctx *provider.Context, data string) string {
org, _ := p.Store.Organization.GetOrganization(ctx.Request, ctx.OrgID)
var transport = &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true, // TODO should be glick.InsecureSkipVerifyTLS (from -insecure flag) but get error: x509: certificate signed by unknown authority
}}
client := &http.Client{Transport: transport}
resp, _ := client.Post(org.ConversionEndpoint+"/api/plantuml", "application/text; charset=utf-8", bytes.NewReader([]byte(data)))