Update README.md
Browse files
README.md
CHANGED
|
@@ -1,25 +1,27 @@
|
|
| 1 |
---
|
| 2 |
-
title: ooshan
|
| 3 |
emoji: 🔒
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: blue
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
secrets:
|
| 9 |
-
- TARGET_HF_SPACE_URL # مهم: این سکرت باید در تنظیمات اسپیس تعریف
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# Nginx Proxy Space
|
| 13 |
|
| 14 |
-
This Hugging Face Space uses Nginx to act as a reverse proxy for another
|
| 15 |
-
|
| 16 |
|
| 17 |
## Configuration Required:
|
| 18 |
|
| 19 |
1. **Set the Secret:**
|
| 20 |
* Go to the **Settings** tab of this Space.
|
| 21 |
* Under **Secrets**, add a new secret with the name: `TARGET_HF_SPACE_URL`
|
| 22 |
-
* Set its value to the full URL of the Hugging Face Space you want to proxy (e.g.,
|
| 23 |
* **Important:** The URL must be the complete, accessible URL of the target.
|
| 24 |
|
| 25 |
-
The Nginx configuration
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: ooshan
|
| 3 |
emoji: 🔒
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: blue
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
secrets:
|
| 9 |
+
- TARGET_HF_SPACE_URL # مهم: این سکرت باید در تنظیمات اسپیس تعریف شود. آدرس کامل اسپیس اصلی خود را اینجا قرار دهید.
|
| 10 |
+
app_port: 7860 # Nginx روی این پورت در داخل کانتینر گوش میدهد
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Nginx Proxy Space
|
| 14 |
|
| 15 |
+
This Hugging Face Space uses Nginx to act as a reverse proxy for another Hugging Face Space.
|
| 16 |
+
The primary goal is to hide the URL of the target space from being easily discoverable in browser network tools, especially in headers like `Link rel="canonical"`.
|
| 17 |
|
| 18 |
## Configuration Required:
|
| 19 |
|
| 20 |
1. **Set the Secret:**
|
| 21 |
* Go to the **Settings** tab of this Space.
|
| 22 |
* Under **Secrets**, add a new secret with the name: `TARGET_HF_SPACE_URL`
|
| 23 |
+
* Set its value to the full URL of the Hugging Face Space you want to proxy (e.g., `پرید`).
|
| 24 |
* **Important:** The URL must be the complete, accessible URL of the target.
|
| 25 |
|
| 26 |
+
The Nginx configuration dynamically uses the `TARGET_HF_SPACE_URL` secret.
|
| 27 |
+
The `Link` header and `X-Canonical-Url` header from the target space will be removed by Nginx to prevent exposing the target URL.
|