Apache2-SSI

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    DATE_GMT
    DATE_LOCAL
    DOCUMENT_ARGS
    DOCUMENT_NAME
    DOCUMENT_PATH_INFO
    DOCUMENT_URI
    LAST_MODIFIED
    QUERY_STRING_UNESCAPED
    USER_NAME

    See Apache documentation
    <https://httpd.apache.org/docs/current/en/mod/mod_include.html#page-head
    er> and this page too
    <https://httpd.apache.org/docs/current/en/expr.html#page-header> for
    more information.

  expressions
    There is reasonable, but limited support for Apache expressions. For
    example, the followings are supported

    In the examples below, we use the variable "QUERY_STRING", but you can
    use any other variable of course.

    The regular expression are the ones PCRE <http://www.pcre.org/>
    compliant, so your perl regular expressions should work.

        <!--#if expr="$QUERY_STRING = 'something'" -->
        <!--#if expr="v('QUERY_STRING') = 'something'" -->
        <!--#if expr="%{QUERY_STRING} = 'something'" -->
        <!--#if expr="$QUERY_STRING = /^something/" -->
        <!--#if expr="$QUERY_STRING == /^something/" -->
        # works also with eq, ne, lt, le, gt and ge
        <!--#if expr="9 gt 3" -->
        <!--#if expr="9 -gt 3" -->
        # Other operators work too, namely == != < <= > >= =~ !~
        <!--#if expr="9 > 3" -->
        <!--#if expr="9 !> 3" -->
        <!--#if expr="9 !gt 3" -->
        # Checks the remote ip is part of this subnet
        <!--#if expr="-R 192.168.2.0/24" -->
        <!--#if expr="192.168.2.10 -R 192.168.2.0/24" -->
        <!--#if expr="192.168.2.10 -ipmatch 192.168.2.0/24" -->
        # Checks if variable is non-empty
        <!--#if expr="-n $some_variable" -->
        # Checks if variable is empty
        <!--#if expr="-z $some_variable" -->
        # Checks if the visitor can access the uri /restricted/uri
        <!--#if expr="-A /restricted/uri" -->

    For subnet checks, this uses Net::Subnet

    Expressions that would not work outside of Apache, i.e. it will return
    an empty string:

        <!--#expr="%{HTTP:X-example-header} in { 'foo', 'bar', 'baz' }" -->

    See Apache documentation <http://httpd.apache.org/docs/2.4/en/expr.html>
    for more information.

CREDITS
    Credits to Ken Williams for his implementation of Apache::SSI from which
    I borrowed some code.

AUTHOR
    Jacques Deguest <jack@deguest.jp>

    CPAN ID: jdeguest

    <https://gitlab.com/jackdeguest/Apache2-SSI>

SEE ALSO
    Apache2::SSI::File, Apache2::SSI::Finfo, Apache2::SSI::Notes,
    Apache2::SSI::URI, Apache2::SSI::SharedMem and Apache2::SSI::SemStat

    mod_include, mod_perl(3), Apache::SSI,
    <https://httpd.apache.org/docs/current/en/mod/mod_include.html>,
    <https://httpd.apache.org/docs/current/en/howto/ssi.html>,
    <https://httpd.apache.org/docs/current/en/expr.html>
    <https://perl.apache.org/docs/2.0/user/handlers/filters.html#C_PerlOutpu
    tFilterHandler_>

COPYRIGHT & LICENSE
    Copyright (c) 2020-2021 DEGUEST Pte. Ltd.

    You can use, copy, modify and redistribute this package and associated
    files under the same terms as Perl itself.



( run in 0.527 second using v1.01-cache-2.11-cpan-39bf76dae61 )