mason/dhandler: Announce source code through `X-AGPL-Source' HTTP header.
[tgal] / mason / dhandler
index 24b5026..2383d6b 100755 (executable)
@@ -290,8 +290,7 @@ Failed to find &lsquo;<% $path |h %>&rsquo;.
     terms of the
     <a rel=license href="https://www.gnu.org/licenses/agpl-3.0.en.html">GNU Affero
     General Public License version 3</a>.
-    Browse or download
-    the <a href="https://git.distorted.org.uk/~mdw/tgal/">source code</a>.
+    Browse or download the <a href="<% $SRCURL %>">source code</a>.
   </div>
 % my $user =
 %   find_covering_file $IMGROOT, $path, ".tgal-footer.html";
@@ -325,6 +324,7 @@ use Data::Dumper;
        elsif (-d $st) { $comp = ".contact"; }
        elsif (-f $st) { $comp = ".image"; }
        else { $comp = ".not-found"; }
+        $r->header_out("X-AGPL-Source" => $SRCURL);
        $m->comp($comp, path => $path);
 </%init>
 %