File size: 1,687 Bytes
db2f45d
a818eab
c9e9d9f
 
db2f45d
 
c9e9d9f
db2f45d
c9e9d9f
 
 
db2f45d
 
c9e9d9f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29f5847
c9e9d9f
29f5847
c9e9d9f
29f5847
c9e9d9f
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
title: virayeshstori
emoji: 🕵️‍♂️
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860 # Port your app inside the Docker container listens on
pinned: false
# Add license if you want, e.g., license: mit
secrets:
  - TARGET_HF_SPACE_URL # This is the name of the secret you need to create
---

# Proxy Space

This Hugging Face Space acts as a proxy to another URL, typically another Hugging Face Space.
Its primary purpose is to obscure the direct URL of the target Space when embedded in an iframe.

## Configuration

1.  **Set the Secret:**
    *   Go to the **Settings** tab of this Space.
    *   Under **Secrets**, add a new secret with the name: `TARGET_HF_SPACE_URL`
    *   Set its value to the full URL of the Hugging Face Space you want to proxy (e.g., `https://username-target-space-name.hf.space/`).
    *   **Important:** The URL must be the complete, accessible URL of the target.

## Usage

Once the secret is set and the Space is running, you can use the following URL as the `src` for your iframe on your website:

`یه روزی یه مرده می‌ره میخوره به نرده برمی‌گردد ؟ یا بر میگرده؟`

(Replace `نه` with the actual URL of *this* proxy Space).

The root URL (`نه/`) will show a test page with an embedded iframe pointing to `/proxy_content`.

---

**Troubleshooting:**
*   Check the "Logs" tab of this Space for any error messages.
*   Ensure `TARGET_HF_SPACE_URL` secret is correctly set.
*   Ensure the target Space is public and accessible.
*   The `<base>` tag injection in `app.py` is crucial for relative links in the target Space to work. If images/CSS/JS are broken, this is often the culprit.