Bruno Martins > Perlbal-Plugin-Addheader-0.02 > Perlbal::Plugin::Addheader

Download:
Perlbal-Plugin-Addheader-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Perlbal::Plugin::Addheader - Add Headers to Perlbal webserver/reverse_proxy responses

VERSION ^

Version 0.01

Description ^

This module allows you to add/change headers to/from perlbal responses.

You can configure headers to be added/changed based on each service declared, although the service role has to be set to web_server or reverse_proxy.

For each header you want to add/change, you have to specify the header content, this header content can be a set of characters or Perl code that will be evaluated for each response.

SYNOPSIS ^

This module provides a Perlbal plugin wich can be loaded and used as follows

    Load Addheader

    #ADDHEADER <service_name> <header_name> <header_content>
    ADDHEADER static Server This is My Webserver
    
    CREATE SERVICE static
        SET ROLE = web_server
        SET docroot /server/static
        SET plugins = Addheader
    ENABLE static

In this case for each response served by the Service static, the header Server will be changed to This is my Webserver.

In cases where you need a dynamic value to be server as header content, you can put Perl code as the header content, surrounding the header content with [% and %].

    ADDHEADER static Expires [% {use HTTP::Date;HTTP::Date::time2str(time() + 2592000)} %]

In this case, for each response, the header Expires will be added, ant the content will be the time in exactly 30 days from the time the response has been sent .

AUTHOR ^

Bruno Martins, <bruno.martins at co.sapo.pt>

BUGS ^

Please report any bugs or feature requests to bug-perlbal-plugin-addheader at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Perlbal-Plugin-Addheader. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Perlbal::Plugin::Addheader

You can also look for information at:

TODO ^

Allow add/change response headers on all services (non role dependent)

Allow add/change response headers on all services at a time (one line configuration)

COPYRIGHT & LICENSE ^

Copyright 2009 Bruno Martins <bruno.martins at co.sapo.pt> and SAPO http://www.sapo.pt, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: