nanoexpress/nanoexpress

View on GitHub
src/response-proto/http/polyfill-chunks/get-proxied-ip.js

Summary

Maintainability
A
1 hr
Test Coverage
/** global: Buffer */

export default function getIP() {
  // Detect self
  const _self = this.send ? this : this.__response;

  return Buffer.from(_self.getProxiedRemoteAddressAsText()).toString();
}