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
RATE_IP_SOURCE_HEADER=""# useful when behind a reverse-proxy
35
39
```
36
40
37
41
## Usage
@@ -43,7 +47,7 @@ console.log(html);
43
47
```
44
48
results in:
45
49
```
46
-
Access to fetch at 'https://example.com' from origin 'https://...' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
50
+
Access to fetch at 'https://github.com' from origin 'https://...' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
47
51
```
48
52
49
53
---
@@ -64,7 +68,7 @@ succeds!
64
68
## I already have a reverse-proxy
65
69
When using a [bare Git repository](https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server) on a [VPS](https://en.wikipedia.org/wiki/Virtual_private_server) this proxy is not necessary, since you control the enviroment.
66
70
67
-
You can use any [reverse-proxy](https://en.wikipedia.org/wiki/Reverse_proxy) of your choice (e.g. [Caddy](https://caddyserver.com/) or [Nginx](https://nginx.org/en/)), and just add the CORS headers there.\
71
+
You can use any [reverse-proxy](https://en.wikipedia.org/wiki/Reverse_proxy) of your choice (e.g.,[Caddy](https://caddyserver.com/) or [Nginx](https://nginx.org/en/)), and just add the CORS headers there.\
68
72
Example configuration for Caddy:\
69
73
(based on [this](https://www.jamesatkins.com/posts/git-over-http-with-caddy/) very cool article)
70
74
```caddyfile
@@ -114,6 +118,3 @@ your-repo-domain.com {
114
118
}
115
119
}
116
120
```
117
-
118
-
## TODO
119
-
- rate-limiter (redis? for multi instance deployment)
0 commit comments