项目作者: caltechlibrary

项目描述 :
Simple CORS proxy server suitable for use as a system daemon on CentOS/RHEL systems
高级语言: JavaScript
项目地址: git://github.com/caltechlibrary/corsproxy.git
创建时间: 2020-04-22T19:12:32Z
项目社区:https://github.com/caltechlibrary/corsproxy

开源协议:Other

下载


" class="reference-link">Corsproxy

This is a a simple CORS proxy server suitable to install as a system service on Linux servers. It uses CORS Anywhere.

License
Latest release

Table of contents

Introduction

The development of web-based applications, particularly single-page applications written using JavaScript, can be stymied by problems involving CORS security measures enforced by web browsers. One problem happens when a network server providing a remote API service does not support CORS: if the nature of the network API requires nontrivial types of operations (e.g., HTTP POST requests that contain data payloads), the web browser running the single-page application will enforce CORS requirements, and the API requests will fail when the server does not respond correctly.

A simple solution to this problem is to insert an intermediate proxy server between the web application and the network service. An example of such a proxy server is CORS Anywhere, an open-source proxy server that runs in NodeJS. CORS Anywhere works well, and only needs some additional elements to make it suitable for running as a standard system service on a Linux server. This project (Corsproxy) aims to provide those additional elements. Corsproxy also tries to simplify some of the configuration steps in using CORS Anywhere.

Installation

Detailed installation and configuration instructions are given in the file admin/README.

Usage

Corsproxy is meant to be started and stopped using standard system tools such as systemctl on CentOS. Detailed instructions are given in the file admin/README.

Known issues and limitations

  • The way that host restrictions/rate limits are implemented is based primarily on the Origin header in HTTP requests. This works and has some security advantages, but makes it more difficult to configure in some other situations.

Getting help

If you find an issue, please submit it in the GitHub issue tracker for this repository.

License

Software produced by the Caltech Library is Copyright (C) 2020, Caltech. This software is freely distributed under a BSD/MIT type license. Please see the LICENSE file for more information.

Authors and history

Michael Hucka developed the first version of Corsproxy after running into problems during the implementation of a Vue.js based application that had to interact with a non-CORS enabled network service.

Erik Demaine contributed a pull request in Feb. 20201 to add support for explicit white lists and black lists.

Acknowledgments

Corsproxy makes use of CORS Anywhere, without which it would have been effectively impossible to develop Corsproxy with the resources we had.

The vector artwork used as a starting point for the logo for this repository was created by Timofey Rostilov for the Noun Project. It is licensed under the Creative Commons Attribution 3.0 Unported license. The vector graphics was modified by Mike Hucka to change the color and remove text.

This work was funded by the California Institute of Technology Library.