Provides an additional layer of security for RapidAPI APIs built on Node.js.
npm i passport-rapid-api-auth
const passport =const Strategy: RapidAPIPassportStrategy =const authParams =passReqToCallback: falseproxySecret: 'RAPID_API_PROXY_SECRET'passport
RapidAPI Proxy Secret
For security, you should protect your API by blocking requests that are not from the RapidAPI infrastructure. RapidAPI adds the "X-RapidAPI-Proxy-Secret" header on every request. This header has a unique value for each API. if this header is missing or has a different value from the value specified below, you should assume the request is not from RapidAPI infrastructure.
This value can be found under the "Settings" tab in your RapidAPI configuration.