Skip to content

Commit

Permalink
Closes #697
Browse files Browse the repository at this point in the history
  • Loading branch information
justingit committed Oct 3, 2017
1 parent 45a4ee7 commit 0bb0e03
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
12 changes: 11 additions & 1 deletion dada/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@ DirectoryIndex mail.cgi index.php index.html

# See: http://dadamailproject.com/d/features-restful_web_services.pod.html
# The below line may need to be uncommented too allow Web Services to work:
# SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
# SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

# These headers are used to stop the server from caching screens used by
# Dada Mail. Uncomment and customize to taste:
#
# Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
# Header set Pragma "no-cache"
# Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"



10 changes: 10 additions & 0 deletions dada/DADA/App.pm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ sub cgiapp_init {

}

sub cgiapp_prerun {
my ( $self, $output_ref ) = @_;
$self->header_props(
-charset => $DADA::Config::HTML_CHARSET,
-Pragma => 'no-cache',
'-Cache-control' => 'max-age=0, no-cache, no-store, must-revalidate',
-Expires => 'Wed, 11 Jan 1984 05:00:00 GMT',
);
}

sub cgiapp_postrun {
my ( $self, $output_ref ) = @_;
$$output_ref = safely_encode($$output_ref);
Expand Down
4 changes: 1 addition & 3 deletions dada/DADA/Template/HTML.pm
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,11 @@ sub admin_template {
}


# This needs to die.
sub admin_header_params {

my %params = (
-type => 'text/html',
-charset => $DADA::Config::HTML_CHARSET,
-Pragma => 'no-cache',
'-Cache-control' => 'no-cache, must-revalidate',
);

return %params;
Expand Down

0 comments on commit 0bb0e03

Please sign in to comment.