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

add proxy support when communicate with plantuml (remove spaces)

This commit is contained in:
Di_Moon 2020-08-14 11:56:27 +03:00
parent 4e0218f5ea
commit c7413da943

View file

@ -105,9 +105,7 @@ func (p *Provider) generateDiagram(ctx *provider.Context, data string) string {
Proxy: http.ProxyFromEnvironment, 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)))