aker-proxy-plugin

command module
v0.0.0-...-f122ce7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

Important Notice

This public repository is read-only and no longer maintained.

CLA assistant

Aker Proxy Plugin

The Aker proxy plugin forwards requests to a remote server. This plugin consumes the request and will be the last in the chain of plugins for a given path.

License

This project is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file.

User Guide

Following is an example of a valid configuration for this plugin.

url: http://example.org
proxy_path: "/"
preserve_internal_headers: true
flush_interval: 300ms

The url property specifies the remote endpoint to which requests will be forwarded.

The proxy_path property can be used to remove part of the original request path.

The preserve_internal_headers property specifies whether x-aker-* headers will be forwarded to the remote target. If the remote resources is hosted by an untrusted provider, then it makes sense to keep this value false.

The flush_interval property can be used to specify the flush interval to the ReverseProxy. It shares the same format as the duration string in ParseDuration. Defaults to zero which means there is no periodic flushing.

For example, with the following configuration in Aker,

endpoints:
  - path: /two/segments
    plugins:
      - ...
        configuration:
          url: http://example.org/target
          proxy_path: "/two"
          preserve_internal_headers: true

if you were to access Aker on /two/segments/suffix, the requests would be forwarded to http://example.org/target/segments/suffix.

Tests

aker-proxy-plugin project contains unit tests, in order to execute them run the following command in project root directory.

ginkgo -r

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL