domain-fix

"This is a package is to use particular domain for your api server"

Usage no npm install needed!

<script type="module">
  import domainFix from 'https://cdn.skypack.dev/domain-fix';
</script>

README

domain-fix

To strict your api servers for your desired domains

To install

npm install domain-fix --save

//For a single domain
const domainFix = require('domain-fix');

let domainCheck = domainFix(domainName,request); // domainName should be a string; request is the request parameter coming from your UI
// The module will give you true/false response
//For multiple domain
const domainFix = require('domain-fix');

let domainCheck = domainFix(domainList,request); // domainList should be an array of domains you want to allow; request is the request parameter coming from your UI
// The module will give you true/false response

Author : Tanumay Ghosh