mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
[@types/restify] Implementing 'serveStaticFiles' from restify@8 (#37774)
* Implementing 'serveStaticFiles' from restify@8 * Changes from husky
This commit is contained in:
committed by
Sheetal Nandi
parent
8fc95ac32d
commit
9d448c8b05
Vendored
+514
-483
File diff suppressed because it is too large
Load Diff
@@ -143,6 +143,15 @@ server.use(restify.plugins.queryParser());
|
||||
server.use(restify.plugins.jsonp());
|
||||
server.use(restify.plugins.gzipResponse());
|
||||
server.use(restify.plugins.bodyParser());
|
||||
server.use(
|
||||
restify.plugins.serveStaticFiles('somePath', {
|
||||
etag: '1',
|
||||
maxAge: 10,
|
||||
setHeaders: (res: restify.Response, path: string, stat: object) => {
|
||||
res.setHeader('header-set-x', 'some-header');
|
||||
},
|
||||
}),
|
||||
);
|
||||
server.use(restify.plugins.throttle({
|
||||
burst: 100,
|
||||
rate: 50,
|
||||
|
||||
Reference in New Issue
Block a user