@maugli-sbc/loopback-component-custom-headers

0.1.2 • Public • Published

Loopback Component Custom Headers

Sets cache headers according to the model configuration

Add the following configuration to your model configuration if you want to enable custom headers.

MyModel {
    "options": {
        "setCustomHeaders": true,
        "customHeaders": {
            "Cache-Control": "public, max-age=86400",
            "Vary": "User-Agent"
        }
    }
}

Pameters:

  • setCustomHeaders: Boolean enables the feature for the given model.
  • customHeaders: Object adds all configured headers to the response where the key is the name of the header and the value the header value.

Readme

Keywords

Package Sidebar

Install

npm i @maugli-sbc/loopback-component-custom-headers

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

6.33 kB

Total Files

16

Last publish

Collaborators

  • hayk.sahakyan