GitLab now enforces expiry dates on tokens that originally had no set expiration date. Those tokens were given an expiration date of one year later. Please review your personal access tokens, project access tokens, and group access tokens to ensure you are aware of upcoming expirations. Administrators of GitLab can find more information on how to identify and mitigate interruption in our documentation.
*Dynamic And Compressing Api Proxy* is a service which lets you proxy arbitrary API-Endpoints which are by themself to slow to be used in production environments. All cached Responses are held in memory, so be sure to provide enough.
The service *Dynamic And Compressing Api Proxy* can be used to handle as proxy for self-defined API-Endpoints. All cached responses will be kept in memory. Please calculate to provide enough memory therefor.
Use of service can be worth if you deal with slow api-endpoints in production environment.
## Requirements
...
...
@@ -33,46 +35,46 @@ You can customize multiple values, see [Advanced Configuration]
## Usage
After Start the Admin-Interface is available under`http://localhost:3000/admin`.
After starting the Admin-Interface the application is available at`http://localhost:3000/admin`.
First of all one has to define a *Cache* where the requests to an API-Endpoint are stored. This is done from within the AdminInterface.
First of all a *Cache* has to be defined where all requests of an API-Endpoint are stored. This is done at the Admin-Interface.
One has to define the URL to the desired*API-Endpoint* (e.g. `http://foo.example.com/`) and a *Cache-Name*for this API-Endpoint (e.g. `foo`).
Fill in the *url* of the*API-Endpoint* (e.g. `http://foo.example.com/`) and a *Cache-Name* (e.g. `foo`).
**Be sure to append the Slash after the Cache-Name, otherwise the Endpoint cannot be resolved.*
**Be sure to append the slash after the Cache-Name, otherwise the Endpoint cannot be resolved.*
**Everything after the Cache-Name and Slash will be passed to the API-Endpoint.*
## Advanced Configuration
The service can be configured by environment variables. The following are available:
The service can be configured by environment variables. Following options are available:
*`data_dir`: Specifies the folder where the cache is stored in intervals. This is only used to make it more easy to restart the service without adding all Endpoints again. After restart the service reads the saved cache-file and keeps it in memory. By default this points to the `data`-folder where the process was invoked. Make sure it can be created if not existing and written if already existing.
*`proxy_path`: Specifies the path where the Endpoints will be accessable after registering. By default this is `/ep/`.
*`proxy_port`: Specifies the port number where the service is listening. Defaults to `3000`.
*`proxy_url`: Specifies the absolute url of the service with protocol and port if differing from the defaults (e.g. `https://api.example.com:8443/dacap`). Defaults to `http://localhost:${proxy_port}`.
*`cache_ttl`: Specifies the time-to-live in seconds of a cached request. after this time the cache will be refreshed. Defaults to `600`
*`proxy_path`: Specifies a path where endpoints will be accessable after registering. By default this is `/ep/`.
*`proxy_port`: Specifies a port number where the service is listening. Defaults to `3000`.
*`proxy_url`: Specifies an absolute url of the service with protocol and port if it differs from defaults (e.g. `https://api.example.com:8443/dacap`). Defaults to `http://localhost:${proxy_port}`.
*`cache_ttl`: Specifies a time-to-live in seconds of a cached request. After this the cache will be refreshed. Defaults to `600`
*`default_check_period`: Specifies the interval in seconds the cache is checked for expiry. Defaults to `60`
*`array_value_size`: Unkown configuration. Defaults to `40`
*`object_value_size`: Unkown configuration. Defaults to `80`
*`autosave_interval`: Specifies the interval the cache is stored to harddisk. Defaults to `60`.
*`register_name`: Specifies the name of the register where the cache is stored. Defaults to `api-cache`.
*`strip_path`: Specifies whether the path should be stripped when processing requests. Defaults to `true`.
*`user`: Specifies the user for simple basic authentication. Defaults to `undefined`.
*`password`: Specifies the password for simple basic authentication. Defaults to `undefined`.
*`array_value_size`: Unknown configuration. Defaults to `40`
*`object_value_size`: Unknown configuration. Defaults to `80`
*`autosave_interval`: Specifies the interval the cache is stored to disk. Defaults to `60`.
*`register_name`: Specifies the name of register where the cache is stored. Defaults to `api-cache`.
*`strip_path`: Specifies if the path should be stripped processing requests. Defaults to `true`.
*`user`: Specifies an user for simple basic authentication. Defaults to `undefined`.
*`password`: Specifies a password for simple basic authentication. Defaults to `undefined`.
**Only when both `user` and `password` are specified basic-auth is enabled**
**Only if both `user` and `password` are specified basic-auth is enabled**
## Documentation
Docs are created with [mkdocs] and published to [Github Pages]
Docs was created with [mkdocs] and published to [Github Pages]