AI Azure Content Safety Policy

Log blocked request and response content

Configure the AI Azure Content Safety policy to log the raw content of blocked requests and responses. When a request or response is blocked, the original prompt or response body is captured in the log entry under ai.proxy.azure-content-safety.input_faulty_prompt and ai.proxy.azure-content-safety.output_faulty_response.

Prerequisites

  • An Azure subscription and access to Azure AI Content Safety.

  • An existing AI Model.

  • An existing logging policy such as HTTP Log or File Log.

Environment variables

  • CONTENT_SAFETY_URL: The full URL of the Azure AI Content Safety instance.

  • CONTENT_SAFETY_KEY: The API key to access the Azure AI Content Safety instance.

Set up the policy

Attach the policy

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!