chiark / gitweb /
mason/common/autohandler: Include `X-AGPL-Source' header.
[odin-cgi] / mason / common / autohandler
index 9630ac838a8e5d785dd76e02d47816e1d4f97b80..82e8923ec952bbf598557138433d41d83d862b11 100644 (file)
@@ -1,8 +1,33 @@
+%# -*-html-*-
+%#
+%# Common Mason machinery for Odin web services
+%#
+%# (c) 2015 Mark Wooding
+%#
+%#----- Licensing notice ----------------------------------------------------
+%#
+%# This file is part of the `odin.gg' service, `odin-cgi'.
+%#
+%# `odin-cgi' is free software; you can redistribute it and/or modify
+%# it under the terms of the GNU Affero General Public License as
+%# published by the Free Software Foundation; either version 3 of the
+%# License, or (at your option) any later version.
+%#
+%# `odin-cgi' is distributed in the hope that it will be useful,
+%# but WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%# GNU Affero General Public License for more details.
+%#
+%# You should have received a copy of the GNU Affero General Public
+%# License along with `odin-cgi'; if not, see
+%# <http://www.gnu.org/licenses/>.
+%#
 <%perl>
        Odin::set_mason_failproc $m;
        Odin::cgi_who $r;
        Odin::fetch_cookies $r;
        $r->content_type("text/html; charset=utf8");
+       $r->header_out("X-AGPL-Source" => $Odin::SRCURL);
        $m->call_next;
 </%perl>
 %#
@@ -24,7 +49,8 @@
 
 <% $m->content %>
 <div class="footer">
-Written by Mark Wooding<br>
+(c) 2015&ndash;2017 Mark Wooding;
+<a href=<% $Odin::SRCURL %>>Free software</a><br>
 </div>
 </body>
 </html>
@@ -54,6 +80,10 @@ Error\
 </%args>
 </%method>
 %#
+<%init>
+       Odin::update_now;
+</%init>
+%#
 <%once>
        use utf8;
        use Odin;