Technical Articles
F5 SMEs share good practice.
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner
Historic F5 Account

Have you seen the HTTP Status Cats? Now there is a Node.js module in NPM that can be used as an Express middleware for setting the X-Status-Cat header, because that is useful! LineRate can also do it. The script below puts the link to the appropriate HTTP Status Cat in the X-Status-Cat header.

var cats = require('http-status-cats').cats;
var vsm = require('lrs/virtualServerModule');

function addRespHandler(req, res, next) {
  next.on('response', function(clires) {
    res.setHeader('X-Status-Cat', cats[clires.statusCode]);

vsm.on('exist', 'vs', function(vs) { vs.on('request', addRespHandler); });

Go ahead and clone my gist. My favorite status code is even included from RFC 2324, 418.

Version history
Last update:
‎28-Oct-2014 13:17
Updated by: