Skip to content
This repository has been archived by the owner on May 29, 2018. It is now read-only.

Commit

Permalink
fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
hiendv committed Aug 19, 2016
1 parent d9f342d commit 829d759
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ app.context.github = new Octokat({
const badge = new Badge(app.context, process.env)

app.use(Serve(path.join(__dirname, '../public'), {
gzip: true,
maxage: 31536000000
}))

Expand All @@ -32,6 +33,7 @@ app.use(Route.get('/p/:user', function * (user) {

app.use(Route.get('/:user/:repo?', function * show (id, repo) {
yield badge.show(id, repo).then(src => {
this.set('Cache-Control', 'no-cache, no-store, must-revalidate')
this.redirect(src)
})
}))
Expand Down

0 comments on commit 829d759

Please sign in to comment.