0.3.13 • Published 7 years ago

redrouter.resolver.http v0.3.13

Weekly downloads
4
License
GPL-2.0
Repository
github
Last release
7 years ago

RedRouter HTTP Resolver

The HTTP Resolver, intended for use with the HTTP Agent, routes HTTP and HTTPS requests. The route records can be created by prefixing the HTTP:: string to the route, For example, if I wanted to create an HTTP proxy for "example.org":

key: HTTP::example.org
value:
{
  host: "10.100.1.10"
}

If I would like to proxy certain paths, I can add these to the routes object. For example, "example.org/animals" would route to 10.100.1.11, but "example.org/animals/bear" would route to 10.100.1.12, but any other path inside of example.org would route to 10.100.1.10:

key: HTTP::example.org
value:
{
  host: "10.100.1.10",
  routes: [
    {
      url : "animals"
      host: "10.100.1.11"
    },
    {
      url : "animals/bear"
      host: "10.100.1.12"
    }
  ]
}

If you dont wish to supply all of these fields, you can establish defaults by passing the same keys into the resolver_ssh options when you create the RedRouter object:

resolvers: [
  { constructor: resolver_http,
    options: {
      defaults: {
        redirect_https : true
      }
    }
  }
],
0.3.13

7 years ago

0.3.11

7 years ago

0.3.10

7 years ago

0.3.9

7 years ago

0.3.8

7 years ago

0.3.7

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

8 years ago

0.2.0

8 years ago