0

I am trying to confgiure a re-write action on our Citrix Netscaler load balancers to add in the Report-To response header as we want to setup Network Error Logging but struggling with the Syntax.

The example I have is below, (I add in our subdomain details) but it's failing to work - Im confident that the process is correct as we have added in a HSTS header, it's just the syntax we think is out:

This is the syntax we are using:

Report-To: {"group":"default","max_age":31536000,"endpoints": 
           [{"url":"https://{subdomain}.report-uri.com/a/d/g"}],"include_subdomains":true}

This is the error:

Expression syntax error [^{"group":", Offset 0]

Has anyone added this header in before on a netscaler / or have an idea where we may be going wrong ?

Many thanks in advance

Strohhut
  • 490
  • 1
  • 6
  • 22
DHLon
  • 1
  • 1

1 Answers1

0

I'm pretty sure you are not escaping the " correctly. You can directly run the commands below on the CLI to add the expression to your NetScaler

add rewrite action insert_report_to_header insert_http_header Report-To q<"{\"group\":\"default\",\"max_age\":31536000,\"endpoints\":[{\"url\":\"https:\\/\\/{subdomain}.report-uri.com\\/a\\/d\\/g\"}],\"include_subdomains\":true}">
add rewrite policy report-to-header true insert_report_to_header
virgula24
  • 523
  • 5
  • 23