Hi, am having a problem, it’s not a issue, it’s just consult. I have hydra running in docker in the port 9001, also I have the golang application in the same server, I edited the URL of the cluster to:
sdk.ClusterURL(env.Getenv("HYDRA_CLUSTER_URL", "https://localhost:9001"))
If I let it as HTTP, I mean: "http://localhost:9001"
then the consent app gives error connecting with hydra:
Could not connect to Hydra because: Post http://localhost:9001/oauth2/token: malformed HTTP response "\x15\x03\x01\x00\x02\x02\x16"
with https the connection is made, but at the end of all the authentication process I get:
Could not exhange token: Post https://localhost:9001/oauth2/token: x509: certificate signed by unknown authority
If I set the IP of the server and not localhost, I get the same error message. In other hand, I have Caddy in front of the application so there I use proxy to switch to which port redirect the request, as it:
mydomain.com {
proxy / https:\\localhost:9001 {
max_fails 1
}
log logs/oauth.log
}
But then if I set:
sdk.ClusterURL(env.Getenv("HYDRA_CLUSTER_URL", "https://mydomain.com"))
I get: Could not connect to Hydra because: oauth2: cannot fetch token: 502 Bad Gateway
Response: 502 Bad Gateway
So, how can I deal with it? I want a simple solution, that’s why I was using localhost as the url. Thank you