In the Routes options of the load-balancer, setting up a Direct Response route makes that response returned with a content-type header set to "text/plain". That makes the web browser show the HTML code of the page instead of the web page.
Prompting the user with one tiny extra drop-down menu to set the content-type of the direct response they’re setting up would be very helpful, especially when their origin server have issues that they’re trying to compensate for leveraging F5XC.
Support & Glen Willms provided the following, for anyone that needs an urgent fix...
This can be achieved by creating a custom route object. Custom routes are under multi-cloud app connect.
Here's a sample custom route definition, based on the example documentation
I tried copy and pasting json over from a simple route for adding response_headers_to_add like Chris suggested, I cannot get it to work.
The documentation says it can be text or html, I cannot get it to serve html with the content-type of html. I've tested firefox, chrome and edge, all show the raw html. The documentation shows it working in curl - perhaps this is just a huge miss in product/QA? https://my.f5.com/manage/s/article/K000148053
Either way, I will attempt to get some traction on this issue. I feel like there must be a known workaround because even tho this issue has been reported multiple times its never been fixed.
I have worked around this by inserting a response header of 'Content-Type: text/html' in the route which takes precedence over the default header of text/plain
We've had a customer during the training course, who was asking the exact same thing. Just the option to replace/update the content-type header should be sufficient.
The WAF blocking page (in XC) is already doing this correctly, so copying the behaviour from there might be an option? If possible, this would really improve the usability of the Direct Response option.