Code Monkey home page Code Monkey logo

aker-proxy-plugin's Introduction

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

aker-proxy-plugin's People

Contributors

georgi-lozev avatar plamendoychev avatar sebastianwolf-sap avatar steinermatt avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aker-proxy-plugin's Issues

Support for SSE

The current implementation of proxy plugin does not support SSE.

This is needed for proxying Concourse job logs that wants to GET the http://<host>:8080/api/v1/builds/63163/events with:

Host: <host>:8080
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0
Accept: text/event-stream
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://<host>:8080/teams/main/pipelines/abacus/jobs/<job>/builds/33
Cookie: ATC-Authorization=Bearer <token>
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

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.