initial commit ✨
This commit is contained in:
10
.editorconfig
Normal file
10
.editorconfig
Normal file
@@ -0,0 +1,10 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{js,json,yml}]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
86
.gitignore
vendored
Normal file
86
.gitignore
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
/.yarn/*
|
||||
!/.yarn/patches
|
||||
!/.yarn/plugins
|
||||
!/.yarn/releases
|
||||
!/.yarn/sdks
|
||||
|
||||
# Swap the comments on the following lines if you don't wish to use zero-installs
|
||||
# Documentation here: https://yarnpkg.com/features/zero-installs
|
||||
!/.yarn/cache
|
||||
#/.pnp.*
|
||||
|
||||
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
5
.idea/.gitignore
generated
vendored
Normal file
5
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
12
.idea/_cors-proxy.iml
generated
Normal file
12
.idea/_cors-proxy.iml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/_cors-proxy.iml" filepath="$PROJECT_DIR$/.idea/_cors-proxy.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
11044
.pnp.cjs
generated
Normal file
11044
.pnp.cjs
generated
Normal file
File diff suppressed because one or more lines are too long
BIN
.yarn/cache/cors-anywhere-npm-0.4.4-3b9339133e-02e87cbeba.zip
vendored
Normal file
BIN
.yarn/cache/cors-anywhere-npm-0.4.4-3b9339133e-02e87cbeba.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/eventemitter3-npm-1.2.0-bc5b473e78-1ce3c91340.zip
vendored
Normal file
BIN
.yarn/cache/eventemitter3-npm-1.2.0-bc5b473e78-1ce3c91340.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/http-proxy-npm-1.11.1-19cff8a833-2bd44ed6f4.zip
vendored
Normal file
BIN
.yarn/cache/http-proxy-npm-1.11.1-19cff8a833-2bd44ed6f4.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/proxy-from-env-npm-0.0.1-61b9b61c2d-801947dd78.zip
vendored
Normal file
BIN
.yarn/cache/proxy-from-env-npm-0.0.1-61b9b61c2d-801947dd78.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/requires-port-npm-0.0.1-9176e50b34-36a3414a76.zip
vendored
Normal file
BIN
.yarn/cache/requires-port-npm-0.0.1-9176e50b34-36a3414a76.zip
vendored
Normal file
Binary file not shown.
27
cors_proxy.js
Normal file
27
cors_proxy.js
Normal file
@@ -0,0 +1,27 @@
|
||||
const cors_proxy = require('cors-anywhere')
|
||||
|
||||
const host = 'localhost'
|
||||
const port = 1337
|
||||
|
||||
cors_proxy
|
||||
.createServer({
|
||||
originWhitelist: [],
|
||||
requireHeader: ['origin', 'x-requested-with'],
|
||||
removeHeaders: [
|
||||
'cookie',
|
||||
'cookie2',
|
||||
'x-request-start',
|
||||
'x-request-id',
|
||||
'via',
|
||||
'connect-time',
|
||||
'total-route-time',
|
||||
],
|
||||
redirectSameOrigin: true,
|
||||
httpProxyOptions: {
|
||||
// Do not add X-Forwarded-For, etc. headers, because Heroku already adds it.
|
||||
xfwd: false,
|
||||
},
|
||||
})
|
||||
.listen(port, host, () => {
|
||||
console.log(`Running CORS Anywhere on 'http://${host}:${port}/'`)
|
||||
})
|
10
package.json
Normal file
10
package.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "_cors-proxy",
|
||||
"packageManager": "yarn@3.0.2",
|
||||
"scripts": {
|
||||
"cors": "node cors_proxy.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"cors-anywhere": "^0.4.4"
|
||||
}
|
||||
}
|
55
yarn.lock
Normal file
55
yarn.lock
Normal file
@@ -0,0 +1,55 @@
|
||||
# This file is generated by running "yarn install" inside your project.
|
||||
# Manual changes might be lost - proceed with caution!
|
||||
|
||||
__metadata:
|
||||
version: 4
|
||||
cacheKey: 8
|
||||
|
||||
"_cors-proxy@workspace:.":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "_cors-proxy@workspace:."
|
||||
dependencies:
|
||||
cors-anywhere: ^0.4.4
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"cors-anywhere@npm:^0.4.4":
|
||||
version: 0.4.4
|
||||
resolution: "cors-anywhere@npm:0.4.4"
|
||||
dependencies:
|
||||
http-proxy: 1.11.1
|
||||
proxy-from-env: 0.0.1
|
||||
checksum: 02e87cbebafc371c1d50535b6282feb0ae4b576500a6e3b07cd9b5f7fcd24f6bf4f6edbd3eef3eb730365f109475a1ec33ea116931769762646e78950d4a8696
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eventemitter3@npm:1.x.x":
|
||||
version: 1.2.0
|
||||
resolution: "eventemitter3@npm:1.2.0"
|
||||
checksum: 1ce3c91340f5038bd611c31a32c69167ccc598049a6844f58400583b4d70f5c0c2d13a201c763624f81de461498fe2767d0bfadcb2c0c417e37556a481b00c1d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"http-proxy@npm:1.11.1":
|
||||
version: 1.11.1
|
||||
resolution: "http-proxy@npm:1.11.1"
|
||||
dependencies:
|
||||
eventemitter3: 1.x.x
|
||||
requires-port: 0.x.x
|
||||
checksum: 2bd44ed6f45d49de125862df3818edd64fa6bcdc54baa509c4d3665e19dd3c4a95b80de3e7d9550b95b920c5e235564ff21eb9aff7f74b4df81892555d096ec7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"proxy-from-env@npm:0.0.1":
|
||||
version: 0.0.1
|
||||
resolution: "proxy-from-env@npm:0.0.1"
|
||||
checksum: 801947dd787b417528dee516599bfa4a66ab8508025ee7fe31ce8dddffbd2571a2c113c8fff4a794886fb68a75316af97559f87c0f86fcd59399a300f2bfe6a7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"requires-port@npm:0.x.x":
|
||||
version: 0.0.1
|
||||
resolution: "requires-port@npm:0.0.1"
|
||||
checksum: 36a3414a76ff1dd4f7df519c2315e7af3eb54312d764319cf9aea4e0ab3a084772ff01edb46487c04fa5c9abe5de627e8eeb500d350b9b21407b94fe346358e2
|
||||
languageName: node
|
||||
linkType: hard
|
Reference in New Issue
Block a user