Proxy agent granular configuration #630
Answered
by
panva
eugeniosegala
asked this question in
Q&A
-
Hello! I'm configuring I wanted to confirm that this is the correct way to setup a proxy across all layers (Issuer discover, refresh operations etc...). import { Issuer, custom } from "openid-client";
const issuerUrl = `issuer-url`;
Issuer[custom.http_options] = function () {
return {
agent: proxyAgent,
};
};
const keycloakIssuer = await Issuer.discover(issuerUrl);
keycloakIssuer[custom.http_options] = function () {
return {
agent: proxyAgent,
};
};
keycloakClient = new keycloakIssuer.Client({
// my config...
});
keycloakClient[custom.http_options] = function () {
return {
agent: proxyAgent,
};
}; Ignore the code repetition for now as I just wanted to make clear that I needed to configure the proxy 3 times! Am I getting this right? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
panva
Oct 18, 2023
Replies: 1 comment
-
Yes, your approach works. I believe this will do as well if you only have this one issuer in your codebase.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
eugeniosegala
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, your approach works.
I believe this will do as well if you only have this one issuer in your codebase.