Krakend disable TLS/SSL verification

162 views Asked by At

i can't reach any webpage with ssl.

{
"$schema": "https://www.krakend.io/schema/v3.json",
"version": 3,
"port": 4000,
"timeout": "300000s",
"cache_ttl": "4000s",
"endpoints": [
{
"endpoint": "/users/{name}",
"method": "GET",
"backend": [
{
"host": [
"https://api.github.com"
],
"url_pattern": "/users/{name}"
}
]
}
]
}

my docker-compose.yml

version: "3"
services:
krakend_ce:
image: devopsfaith/krakend:watch
volumes:
- ./krakend:/etc/krakend
ports:
- "9000:9000"
- "4000:4000"
command: ["run", "-d", "-c", "/etc/krakend/krakend.json"]

i got

[00] 2023/10/22 13:22:10 KRAKEND ERROR: [ENDPOINT: /users/:name] Get "https://api.github.com/users/emoleumassi": tls: failed to verify certificate: x509: certificate signed by unknown authority
[00] [GIN] 2023/10/22 - 13:22:10 | 500 | 11.117835144s |      172.20.0.1 | GET      "/users/emoleumassi"
[00] Error #01: Get "https://api.github.com/users/emoleumassi": tls: failed to verify certificate: x509: certificate signed by unknown authority

i tried with

"tls": {
"disabled": true,
"public_key": "/etc/krakend/cert.pem",
"private_key": "/etc/krakend/cert.pem"
},

in krakend.json or KRAKEND_ALLOW_INSECURE_CONNECTIONS=true as environment in docker-compose.yml but nothing.

how can i reach the https webpage without SSL check?

1

There are 1 answers

0
emoleumassi On

i added

"client_tls": {
    "allow_insecure_connections": true
  }