Skip to main content

Migrate from Modules to Traffic Policy Actions

✨ Modules to Traffic Policy Actions Ref

Endpoint ModuleTraffic Policy ActionPhaseNotes
oauthset-vars, oauth, custom-responseon_http_requestMaps OAuth provider and settings.
oidcoidcon_http_requestMaps OpenID Connect settings.
ip_policyrestrict-ipson_tcp_connectMaps allowed IPs or policies.
mutual_tls and tls_terminationterminate-tlson_tcp_connectMaps mTLS and TLS termination settings.
request_headersadd-headers, remove-headerson_http_requestModify request headers.
response_headersadd-headers, remove-headerson_http_responseModify response headers.
compressioncompress-responseon_http_responseEnable response compression.
webhook_validationwebhook-verificationon_http_requestValidate webhook secrets.
circuit_breakercircuit-breakeron_http_requestDefine circuit breaking thresholds.
saml(⚠️ Not supported)N/ATry OIDC or contact support for help.

🛠️ Migration Instructions Per Module

OAuth Authentication (oauth)

Old config example:

Loading…

New Traffic Policy YAML:

Leverages the following actions:

Loading…

OpenID Connect Authentication (oidc)

Old config example:

Loading…

New Traffic Policy YAML:

Leverages the following actions:

Loading…

IP Policy (ip_policy)

Old config example:

Loading…

New Traffic Policy YAML:

Leverages the following actions:

Loading…

Mutual TLS and TLS Termination (mutual_tls, tls_termination)

Old config example:

Loading…

New Traffic Policy YAML:

Leverages the following actions:

Loading…

Request Headers (request_headers)

Old config example:

Loading…

New Traffic Policy YAML:

Leverages the following actions:

Loading…

Response Headers (response_headers)

Old config example:

Loading…

New Traffic Policy YAML:

Leverages the following actions:

Loading…

Compression (compression)

Old config example:

Loading…

New Traffic Policy YAML:

Leverages the following actions:

Loading…

Webhook Validation (webhook_validation)

Old config example:

Loading…

New Traffic Policy YAML:

Leverages the following actions:

Loading…

Circuit Breaker (circuit_breaker)

Old config example:

Loading…

New Traffic Policy YAML:

Leverages the following actions:

Loading…

SAML Authentication (saml)

  • Traffic Policy does not currently natively support SAML.
  • You may want to try out the OIDC action or reach out to ngrok support.

✅ Quick Checklist

ModuleTraffic Policy Action
OAuthset-vars, oauth, custom-response
OIDCoidc
IP Policyip-restriction
Mutual TLS / TLS Termterminate-tls
Request Headersadd-headers, remove-headers
Response Headersadd-headers, remove-headers
Compressioncompress-response
Webhook Verificationwebhook-verification
Circuit Breakercircuit-breaker
SAML⚠️ (Not yet supported)

🛡️ Final Tips

  • Always test your traffic policy in staging before production.
  • Validate YAML syntax carefully — indentation matters.
  • If you have complex expressions, validate them in small steps.
  • If unsure, rebuild small features first, then layer on more complex features.
  • Backup your endpoint configuration before deletion.