Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
httpリクエストをフィルタリングし、関心のある特定のドメインからの呼び出しのみを許可したい。アプリ構成の一部としてそれを行うことは可能ですか?-これに利用できるライブラリはありますか?
req.connection.remoteAddressリクエストを行うシステムのIPアドレスがあります。DNSの逆引き参照を実行して、返されたドメインと照合することができます。ExpressまたはConnectを使用している場合は、これを行うためのミドルウェア関数を作成できます。
req.connection.remoteAddress