UNPKG

strapi-ts

Version:

An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MongoDB, MySQL, MariaDB, PostgreSQL, SQLite

26 lines (21 loc) 387 B
'use strict'; const ip = require('koa-ip'); /** * IP filter hook */ module.exports = strapi => { return { /** * Initialize the hook */ initialize() { const { whiteList, blackList } = strapi.config.middleware.settings.ip; strapi.app.use( ip({ whitelist: whiteList, blacklist: blackList, }) ); }, }; };