Simple CORS proxy server suitable for use as a system daemon on CentOS/RHEL systems
This is a a simple CORS proxy server suitable to install as a system service on Linux servers. It uses CORS Anywhere.
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.
Detailed installation and configuration instructions are given in the file admin/README.
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.
If you find an issue, please submit it in the GitHub issue tracker for this repository.
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.
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.
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.