Is there a way for TYK to read dynamic values to enable/disable HTTP methods on target urls?

I have certain target urls in my tykconfig map that i would like to disable when my cluster is in maintenance or stand by.
The enabling/disabling is dynamic and hence needs tyk to check the value before accepting/rejecting requests.

Hi @anilnp,

Thank you for your patience and welcome to the community :tada:

I’m assuming tykconfig map refers to your API definition.

Have you had a look at Uptime tests? This requires settings on the Gateway config and in the API definition. Are you able to review the docs, and try and see if it meets your needs?

Alternatively, you might consider creating a custom request plugin. This plugin would involve logic to contact your cluster, deciding whether to permit or deny the original request based on the response. Keep in mind that this “pre-check” will happen with each request.

Looking forward to your response.

1 Like

Thank you for the response. I am trying the custom request plugin in Golang.
I am working on it.Will update you here once i get something concrete completed.