inital commit
Some checks failed
Publish Docker Images / docker (push) Failing after 19s

This commit is contained in:
Lee 2023-11-21 12:53:38 +00:00
commit 15f9849ceb
5 changed files with 97 additions and 0 deletions

@ -0,0 +1,26 @@
name: Publish Docker Images
on:
push:
branches:
- "master"
jobs:
docker:
runs-on: ubuntu-22.04
container: fascinated/docker-images:node-pnpm-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Repo
uses: docker/login-action@v3
with:
username: ${{ secrets.REPO_USERNAME }}
password: ${{ secrets.REPO_TOKEN }}
- name: Build and Push (Node)
uses: docker/build-push-action@v5
with:
push: true
tags: fascinated/cors-anywhere:latest

1
.gitignore vendored Normal file

@ -0,0 +1 @@
node_modules

15
package.json Normal file

@ -0,0 +1,15 @@
{
"name": "cors-anywhere-docker",
"version": "1.0.0",
"description": "",
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"cors-anywhere": "^0.4.4"
}
}

40
pnpm-lock.yaml Normal file

@ -0,0 +1,40 @@
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
cors-anywhere:
specifier: ^0.4.4
version: 0.4.4
packages:
/cors-anywhere@0.4.4:
resolution: {integrity: sha512-8OBFwnzMgR4mNrAeAyOLB2EruS2z7u02of2bOu7i9kKYlZG+niS7CTHLPgEXKWW2NAOJWRry9RRCaL9lJRjNqg==}
engines: {node: '>=0.10.0'}
dependencies:
http-proxy: 1.11.1
proxy-from-env: 0.0.1
dev: false
/eventemitter3@1.2.0:
resolution: {integrity: sha512-DOFqA1MF46fmZl2xtzXR3MPCRsXqgoFqdXcrCVYM3JNnfUeHTm/fh/v/iU7gBFpwkuBmoJPAm5GuhdDfSEJMJA==}
dev: false
/http-proxy@1.11.1:
resolution: {integrity: sha512-qz7jZarkVG3G6GMq+4VRJPSN4NkIjL4VMTNhKGd8jc25BumeJjWWvnY3A7OkCGa8W1TTxbaK3dcE0ijFalITVA==}
engines: {node: '>=0.10.0'}
dependencies:
eventemitter3: 1.2.0
requires-port: 0.0.1
dev: false
/proxy-from-env@0.0.1:
resolution: {integrity: sha512-B9Hnta3CATuMS0q6kt5hEezOPM+V3dgaRewkFtFoaRQYTVNsHqUvFXmndH06z3QO1ZdDnRELv5vfY6zAj/gG7A==}
dev: false
/requires-port@0.0.1:
resolution: {integrity: sha512-AzPDCliPoWDSvEVYRQmpzuPhGGEnPrQz9YiOEvn+UdB9ixBpw+4IOZWtwctmpzySLZTy7ynpn47V14H4yaowtA==}
dev: false

15
src/index.js Normal file

@ -0,0 +1,15 @@
// Listen on a specific host via the HOST environment variable
var host = process.env.HOST || "0.0.0.0";
// Listen on a specific port via the PORT environment variable
var port = process.env.PORT || 8080;
var cors_proxy = require("cors-anywhere");
cors_proxy
.createServer({
originWhitelist: [], // Allow all origins
requireHeader: [], // Do not require any headers.
removeHeaders: [], // Do not remove any headers.
})
.listen(port, host, function () {
console.log("Running CORS Anywhere on " + host + ":" + port);
});