Forum Discussion
Need to rewrite a 500 status to 200, but how ?
An HTTP 500 status is an internal error status, and would not usually contain a html payload for display.
What is the content type and payload of the 500 response?
That iRule is the best option, but the actual HTTP::payload probably isn't something that you can send back to the client (unlike a 404, where the response body is expected to be valid HTML).
You can craft a 200 response, but may need to wrap the HTTP::payload in some suitable HTML tags to get then to display properly.
Hi S,
The payload is just text/html but i'm not that handy with iRules to be able to construct such a response. Can you ?
HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Type: text/html; charset=utf-8
X-AspNet-Version: 4.0.30319
X-Frame-Options: SAMEORIGIN
Date: Thu, 21 Nov 2019 06:46:55 GMT
Content-Length: 17554
X-Content-Type-Options: nosniff
X-XSS-Protection: 1;mode=block
Strict-Transport-Security: max-age=31536000
<!DOCTYPE html>
<html>
(content)
</html>