Loading
Salesforce now sends email only from verified domains. Read More

Special character limitations in Flex Gateway header injection policy

Publish Date: Apr 22, 2026
Description

The user encountered an issue where the Flex Gateway header injection policy fails when special characters, such as single quotes, are used in header values. This causes the Flex Gateway to enter a continuous deployment loop and prevents the headers from being applied correctly.

Root Cause:

The root cause of the issue was that the Flex Gateway policy parser failed to correctly interpret header values containing special characters such as single quotes ('), leading to deployment failures and continuous deployment loops.

Resolution for Header Injection Policy with Special Characters:

When using header values containing special characters like {, }, ", =, :, etc., you need to Base64 encode the value and use a DataWeave expression.

Solution:

Use Base64 encoding with a DataWeave expression to safely inject header values containing special characters.

Steps:

1. Base64 encode your token:

echo -n "your-token" | base64

example:

echo -n 'aB3(c5)D7|e9/F1-g3:H5i' | base64

Output: YUIzKGM1KUQ3fGU5L0YxLWczOkg1aQ==

2. In the Header Injection Policy Value field, enter:

#dw::util::Coercions::toString(dw::core::Binaries::fromBase64('YOUR_BASE64'), 'UTF-8')
Resolution

1. Base64 encode the header value containing special characters to ensure proper parsing by the Flex Gateway policy parser.

2. Use a DataWeave expression to decode the Base64 encoded header value in the Header Injection Policy Value field.

Knowledge Article Number

005318980

 
Loading
Salesforce Help | Article