You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start proxy in daemon mode. It will write the PID of the daemon process to `$PWD/cors-proxy.pid`:
30
+
Start proxy in daemon mode.
31
31
32
32
```sh
33
-
cors-proxy start -d
33
+
cors-proxy start
34
34
```
35
35
36
-
Kill the process with the PID specified in `$PWD/cors-proxy.pid`:
36
+
Kill the daemon process:
37
37
38
38
```sh
39
39
cors-proxy stop
@@ -42,67 +42,67 @@ cors-proxy stop
42
42
### CLI configuration
43
43
44
44
Environment variables:
45
+
45
46
-`PORT` the port to listen to (if run with `npm start`)
46
47
-`ALLOW_ORIGIN` the value for the 'Access-Control-Allow-Origin' CORS header
47
48
-`INSECURE_HTTP_ORIGINS` comma separated list of origins for which HTTP should be used instead of HTTPS (added to make developing against locally running git servers easier)
48
49
49
-
50
50
## Middleware usage
51
51
52
52
You can also use the `cors-proxy` as a middleware in your own server.
*The middleware doesn't use the environment variables.* The options object supports the following properties:
66
+
_The middleware doesn't use the environment variables._ The options object supports the following properties:
68
67
69
68
-`origin`: _string_. The value for the 'Access-Control-Allow-Origin' CORS header
70
69
-`insecure_origins`: _string[]_. Array of origins for which HTTP should be used instead of HTTPS (added to make developing against locally running git servers easier)
71
70
-`authorization`: _(req, res, next) => void_. A middleware function you can use to handle custom authorization. Is run after filtering for git-like requests and handling CORS but before the request is proxied.
There is no official chart for this project, helm or otherwise. You can make your own, but keep in mind cors-proxy uses the Micro server, which will return a 403 error for any requests that do not have the user agent header.
0 commit comments