cnnlabs / cnn-hapi

CNN Hapi
10 stars 4 forks source link

Adds the ability to send cache control headers on each reply #12

Closed adslaton closed 8 years ago

adslaton commented 8 years ago

Why

Adds the ability to set cache control headers on each reply

How to test

From the root of this project along with these changes run the following example/app.js:

Terminal 1

$ cd example/
$ node app.js

Terminal 2

$ curl -I http://{your-app-host}

Should see a response similar to the following

HTTP/1.1 200 OK
surrogate-control: max-age=60, stale-while-revalidate=10, stale-if-error=6400
cache-control: 10
content-type: text/html; charset=utf-8
date: Thu, 17 Mar 2016 01:20:48 GMT
X-BACKEND: apps-proxy
adslaton commented 8 years ago

@MDrooker the constructor options payload has been updated