Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fostroll/cors_api_proxy

Just one more simple proxy that remove CORS restrictions for API requests
https://github.com/fostroll/cors_api_proxy

cors flask proxy python

Last synced: 3 days ago
JSON representation

Just one more simple proxy that remove CORS restrictions for API requests

Awesome Lists containing this project

README

        

# CORS API Proxy

Just one more simple proxy that remove CORS restrictions for API requests

## Usage

Dev mode (use Flask server):
```
python cors_api_proxy
```

Prod mode (use WSGI server):
```
python cors_api_proxy prod
```

*Watch Requests* option:
```
python cors_api_proxy watch_reqs
python cors_api_proxy prod watch_reqs
```
The option is used for checking if long requests are still in processing.
Specifically, it's the only way to know when uploading a file to the
server have been finished.

To use this function just add unique *reqid* key to your request. E.g.:
```
http://proxy_url:port/your_api_link?reqid=
```
Then you may check if the request is still in processing:
```
http://proxy_url:port/your_api_link?reqid=&test=true
```
If it is still in, you'll get the response with the status code **204**.
Otherwise, you'll get the status **404**.

## License

***CORS API Proxy*** is released under the Apache License. See the
[LICENSE](https://github.com/fostroll/cors_api_proxy/blob/master/LICENSE) file
for more details.