mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-10 02:55:55 +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
|
||||
{
|
||||
print "Cache-control: private\n";
|
||||
print "Content-type: text/html; charset=UTF-8\n\n";
|
||||
sub showhttpheaders($) {
|
||||
my $overwrites = shift;
|
||||
|
||||
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($) {
|
||||
|
||||
Reference in New Issue
Block a user