https://github.com/captemulation/coc-api-proxy
To help those who need to proxy Clash of Clans API due to CORS
https://github.com/captemulation/coc-api-proxy
Last synced: 13 days ago
JSON representation
To help those who need to proxy Clash of Clans API due to CORS
- Host: GitHub
- URL: https://github.com/captemulation/coc-api-proxy
- Owner: CaptEmulation
- License: mit
- Created: 2016-02-17T04:10:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-17T04:26:42.000Z (over 10 years ago)
- Last Synced: 2025-09-14T21:53:13.637Z (10 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
To help those who need to proxy Clash of Clans API due to CORS
# Usage
- Install [NodeJS](https://nodejs.org/en/download), if necessary.
- Go to (https://developer.clashofclans.com) and register for a developer account, if necessary.
- Create a new token with an IP that matches your IP.
- Save the generated token
- Clone this repo and CD into the directory.
- Run `npm install` to install dependencies.
- Run `COC_TOKEN={token from developer.clashofclans.com} npm start`
By default, the proxy will run on port 8080. Use the `COC_PORT` env variable to change the port.
Now, all requests to `localhost:8080` will proxy to (https://api.clashofclans.com) and will include the Authorization header and be CORS enabled.
# WARNING
This app should be used to developer small demo apps utilizing the clash of clans API in the browser on your local machine only. Using the service in production will expose your developer token for open use by ANYBODY. This is for demostration and development purposes only.