@nitra/cf-security
TypeScript icon, indicating that this package has built-in type declarations

4.5.4 • Public • Published

cf-security

GitHub Super-Linter

Check security header in Cloud Functions

X_NITRA_CF_KEY: secret
const { cfSecurity } = require('@nitra/cf-security')

exports.function = async (req, res) => {
  if (!cfSecurity(req)) {
    res.send(`Nitra security not passed`)
    return
  }
import runSecurity from '@nitra/cf-security'

  if (!runSecurity(req, ["role1","role2"])) {
    res.send(`Nitra security not passed`)
    return
  }

Readme

Keywords

none

Package Sidebar

Install

npm i @nitra/cf-security

Weekly Downloads

52

Version

4.5.4

License

ISC

Unpacked Size

7.51 kB

Total Files

8

Last publish

Collaborators

  • vitaliytv