Skip to content

Commit 2196309

Browse files
committed
ci: use own dockerhub register
1 parent 7cefb43 commit 2196309

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
env:
1818
REGISTRY: docker.io
1919
IMAGE_NAME: simple-cors-proxy
20-
REGISTRY_USER: obeoneorg
20+
REGISTRY_USER: mathiasvda
2121

2222

2323
jobs:

README.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,36 @@
11
# 🐳 Docker Simple CORS Proxy
22

3-
🐳 [Docker Image](https://hub.docker.com/r/obeoneorg/simple-cors-proxy) | 🔗 [TypingMind Plugin](https://cloud.typingmind.com/plugins/p-01HMARRCP06S0B7Y6HRX1F9R0P)
3+
🐳 [Docker Image](https://hub.docker.com/r/mathiasvda/simple-cors-proxy)
44

5-
This is a simple CORS proxy server designed to work with the TypingMind plugin. It allows you to make cross-origin requests to any API without worrying about CORS restrictions.
5+
Based on: https://github.com/obeone/simple-cors-proxy
66

7-
But it's not limited to TypingMind. You can use it with any application that requires a CORS proxy!
7+
This is a simple CORS proxy server. It allows you to make cross-origin requests to any API without worrying about CORS restrictions.
88

99
## 🚀 Features
1010

11-
- 🌐 Seamless integration with external APIs using the TypingMind plugin
11+
- 🌐 Seamless integration with external APIs
1212
- 🔒 Secure authentication using an API key
1313
- 🔗 Ability to proxy requests to any URL using the `X-Url-Destination` header or directly in the URL path
1414
- 🔄 Handles CORS headers to enable cross-origin requests
15+
- ✈️ Automatic preflight OPTIONS request handling (responds with 200 without proxying)
16+
- 🔐 Supports credentials with `Access-Control-Allow-Credentials: true`
1517
- ⚙️ Easy setup and configuration
1618
- 🐳 Docker image available for quick deployment
1719

18-
## ⌨️ TypingMind Plugin
19-
20-
The TypingMind plugin is a powerful tool that enhances the capabilities of GPT. With the TypingMind plugin, GPT can seamlessly make calls to any API without being restricted by CORS (Cross-Origin Resource Sharing) policies. This allows GPT to access external data sources and services, opening up a wide range of possibilities for integration and interaction.
21-
22-
To use the TypingMind plugin, simply install go to the [TypingMind Plugin page](https://cloud.typingmind.com/plugins/p-01HMARRCP06S0B7Y6HRX1F9R0P) and click on Import.
23-
2420
## 🐳 Docker
2521

2622
You can use the Docker image to quickly run the proxy server. Here's how:
2723

2824
1. Pull the Docker image:
2925

3026
```shell
31-
docker pull obeoneorg/simple-cors-proxy
27+
docker pull mathiasvda/simple-cors-proxy
3228
```
3329

3430
2. Run the Docker container:
3531

3632
```shell
37-
docker run -d --name simple-cors-proxy -p 8080:8080 obeoneorg/simple-cors-proxy
33+
docker run -d --name simple-cors-proxy -p 8080:8080 mathiasvda/simple-cors-proxy
3834
```
3935

4036
## 🐳 Docker Compose
@@ -105,7 +101,7 @@ If you need to authenticate access to the proxy server, you can use the `PROXY_T
105101
Example :
106102

107103
```shell
108-
docker run -d --name simple-cors-proxy -p 8080:8080 -e PROXY_TOKEN=YOUR_API_KEY obeoneorg/simple-cors-proxy
104+
docker run -d --name simple-cors-proxy -p 8080:8080 -e PROXY_TOKEN=YOUR_API_KEY mathiasvda/simple-cors-proxy
109105
```
110106

111107
```shell
@@ -123,9 +119,21 @@ In both cases, if you need to remove multiple headers, you can use a comma-separ
123119
So for example :
124120

125121
```shell
126-
docker run -d --name simple-cors-proxy -p 8080:8080 -e HEADERS_TO_DELETE=X-Forwarded-For,X-Forwarded-Host obeoneorg/simple-cors-proxy
122+
docker run -d --name simple-cors-proxy -p 8080:8080 -e HEADERS_TO_DELETE=X-Forwarded-For,X-Forwarded-Host mathiasvda/simple-cors-proxy
127123
```
128124

125+
#### Preflight OPTIONS Requests
126+
127+
The proxy server automatically handles preflight OPTIONS requests for all routes. When an OPTIONS request is received, the server responds with a 200 status code and the appropriate CORS headers without proxying the request to the destination server. This includes:
128+
129+
- `Access-Control-Allow-Origin`: The origin from the request or `*`
130+
- `Access-Control-Allow-Methods`: `GET,POST,PUT,PATCH,DELETE,OPTIONS`
131+
- `Access-Control-Allow-Headers`: `X-Requested-With,Content-Type,Accept,Origin,Last-Modified,Authorization`
132+
- `Access-Control-Allow-Credentials`: `true`
133+
- `Access-Control-Max-Age`: `86400` (24 hours)
134+
135+
This ensures smooth cross-origin requests from browsers without unnecessary round-trips to the destination server.
136+
129137
## 🤝 Contributing
130138

131139
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on [GitHub](https://github.com/obeone/simple-cors-proxy).

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3'
22
services:
33
api-proxy:
4-
image: obeoneorg/simple-cors-proxy
4+
image: mathiasvda/simple-cors-proxy
55
container_name: api-proxy
66
restart: always
77
ports:

0 commit comments

Comments
 (0)