Coder Social home page Coder Social logo

expose private functions? about vhost HOT 4 CLOSED

expressjs avatar expressjs commented on May 12, 2024
expose private functions?

from vhost.

Comments (4)

dougwilson avatar dougwilson commented on May 12, 2024

Hi @sintaxi, I'm really sorry I did not see your issue here (apparently I was not subscribed to notifications on this repository). So some of them are just slimmed down versions already available in npm modules, and I'd be happy to point around if that's the case.

Which particular functions were you looking to export?

from vhost.

dougwilson avatar dougwilson commented on May 12, 2024

I hope it's OK, but I'm going to close this issue, since I'm not sure which functions you are looking to export.

from vhost.

ttonyh avatar ttonyh commented on May 12, 2024

I think the private functions he's talking about are the following:

  • hostnameof
  • hostregexp
  • vhostof

They would be helpful for use in other parts of of an app to predict what "vhost" will be used.

from vhost.

WORMSS avatar WORMSS commented on May 12, 2024

@dougwilson
Is there any word on exposing them?

My usecase.. Playground

  .on('upgrade', (req, socket, head) => {
    for (const proxy of proxies) {
      if (!proxy.test(req)) continue;
      return proxy.ws(req, socket, head);
    }
    socket.destroy();
  })

from vhost.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.