Fix expiry
This commit is contained in:
parent
734d5f8547
commit
fa3474404c
3 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
# angel_static
|
||||
# static
|
||||
|
||||
[![version 1.1.4+1](https://img.shields.io/badge/pub-1.1.4+1-brightgreen.svg)](https://pub.dartlang.org/packages/angel_static)
|
||||
[![Pub](https://img.shields.io/pub/v/angel_static.svg)](https://pub.dartlang.org/packages/angel_static)
|
||||
[![build status](https://travis-ci.org/angel-dart/static.svg?branch=master)](https://travis-ci.org/angel-dart/static)
|
||||
|
||||
Static server middleware for Angel.
|
||||
|
|
|
@ -162,7 +162,7 @@ class CachingVirtualDirectory extends VirtualDirectory {
|
|||
void setCachedHeaders(
|
||||
File file, FileStat stat, RequestContext req, ResponseContext res) {
|
||||
var privacy = accessLevelToString(accessLevel ?? CacheAccessLevel.PUBLIC);
|
||||
var expiry = new DateTime.now()..add(new Duration(seconds: maxAge ?? 0));
|
||||
var expiry = new DateTime.now().add(new Duration(seconds: maxAge ?? 0));
|
||||
|
||||
res.headers
|
||||
..[HttpHeaders.CACHE_CONTROL] = '$privacy, max-age=${maxAge ?? 0}'
|
||||
|
|
|
@ -4,7 +4,7 @@ environment:
|
|||
sdk: ">=1.19.0"
|
||||
homepage: https://github.com/angel-dart/angel_static
|
||||
author: thosakwe <thosakwe@gmail.com>
|
||||
version: 1.1.4+1
|
||||
version: 1.1.4+2
|
||||
dependencies:
|
||||
angel_framework: ^1.0.0-dev
|
||||
intl: ">=0.0.0 <1.0.0"
|
||||
|
|
Loading…
Reference in a new issue