mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
header.pl: Allow passing more HTTP headers to showhttpheaders()
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -232,10 +232,24 @@ sub genmenu {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub showhttpheaders
|
sub showhttpheaders($) {
|
||||||
{
|
my $overwrites = shift;
|
||||||
print "Cache-control: private\n";
|
|
||||||
print "Content-type: text/html; charset=UTF-8\n\n";
|
my %headers = (
|
||||||
|
"Content-Type" => "text/html; charset=UTF-8",
|
||||||
|
"Cache-Control" => "private",
|
||||||
|
|
||||||
|
# Overwrite anything passed
|
||||||
|
%$overwrites,
|
||||||
|
);
|
||||||
|
|
||||||
|
# Print all headers
|
||||||
|
foreach my $header (keys %headers) {
|
||||||
|
print "$header: $headers{$header}\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
# End headers
|
||||||
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub is_menu_visible($) {
|
sub is_menu_visible($) {
|
||||||
|
|||||||
Reference in New Issue
Block a user