Proxy class
Handler for proxying requests to another server.
Example:
proxy = new Proxy('~/foobar/*', 'http://example.com');
proxy.register(pipeline);
Requests for '~/foobar/abc/def' will return the response from "http://example.com/foobar/abc/def".
Constructors
-
Proxy(String method, String pattern, String proxy, { List<
String> ignoreNotFound, List<String> requestBlockHeaders, List<String> responseBlockHeaders }) - Constructor
Properties
- method → String
-
The HTTP method to proxy for.
final
-
requestBlockHeaders
→ List<
String> -
Additional request headers which are not passed through to the target. [...]
final
-
responseBlockHeaders
→ List<
String> -
Additional response headers which are not passed through to the client. [...]
final
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
handleGetOrHead(
Request req) → Future< Response> - GET or HEAD request handler.
-
register(
ServerPipeline ws) → void - Register a proxy with a pipeline.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited
Constants
-
requestHeadersNeverPass
→ const List<
String> -
Headers in the request which are never passed through to the target.
const ['host', 'connection']
-
responseHeadersNeverPass
→ const List<
String> -
Headers in the response which are never passed through to the client.
const ['content-type', 'x-content-type-options', 'x-frame-options', 'x-xss-protection']