lorica

command module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2016 License: MIT Imports: 14 Imported by: 0

README

lorica

Build Status

A proxy for the Summon API.

The Summon API has two problems which make it difficult to use with client-side javascript applications:

  • It does not support CORS.
  • It requires authentication.

Similar to work done by Jonathan Rochkind and others, this proxy addresses those issues.

  • It supports CORS requests, including properly handling preflight OPTIONS requests.
  • It authorizes requests to the API on behalf of the client.

In production, this proxy should be behind an nginx server which imposes rate limiting. This is done so that a malicious client couldn't effectively scrape data from Summon using the provided credentials.

In future, a rate limiter could be added to this server. Pull requests welcome!

Lorica: A proxy for the Summon API
Version 0.2.1

  -accessid string
        Access ID
  -address string
        Address for the server to bind on. (default ":8877")
  -allowedorigins string
        A list of allowed origins for CORS, delimited by the ; character. To allow any origin to connect, use *.
  -loglevel string
        The maximum log level which will be logged. error < warn < info < debug < trace. For example, trace will log everything, info will log info, warn, and error. (default "warn")
  -secretkey string
        Secret Key
  -summonapi string
        Summon API URL. (default "http://api.summon.serialssolutions.com")
  The possible environment variables:
  LORICA_ACCESSID
  LORICA_ADDRESS
  LORICA_ALLOWEDORIGINS
  LORICA_LOGLEVEL
  LORICA_SECRETKEY
  LORICA_SUMMONAPI

Documentation

Overview

Package lorica provides a web server which proxies queries to the Summon API.

Directories

Path Synopsis
This package provides a way to filter log messages depending on their log level.
This package provides a way to filter log messages depending on their log level.

Jump to

Keyboard shortcuts

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