Header
Request method Decorator. Sets a response header.
@Header(name: string, value: string | (() => string))
Parameters
Option | Type | Description |
---|---|---|
name
|
string |
string to be used for header name |
value
|
string | (() => string) |
string to be used for header value |
Returns
MethodDecorator
See also
Description
For example:
@Header('Cache-Control', 'none')
@Header('Cache-Control', () => 'none')