Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -384,7 +384,7 @@ def create_demo():
|
|
| 384 |
}
|
| 385 |
</style>
|
| 386 |
<script>
|
| 387 |
-
const allowed = /^\\/
|
| 388 |
if (!allowed.test(window.location.pathname)) {
|
| 389 |
document.body.innerHTML = '<h1 style="color:#ef4444;font-family:sans-serif;text-align:center;margin-top:100px;">500 Internal Server Error</h1>';
|
| 390 |
throw new Error('500');
|
|
@@ -431,7 +431,7 @@ def create_demo():
|
|
| 431 |
|
| 432 |
app = FastAPI()
|
| 433 |
demo = create_demo()
|
| 434 |
-
app.mount("/
|
| 435 |
|
| 436 |
@app.get("/{path:path}")
|
| 437 |
async def catch_all(path: str):
|
|
|
|
| 384 |
}
|
| 385 |
</style>
|
| 386 |
<script>
|
| 387 |
+
const allowed = /^\\/m5n6b7v8c9x0z1a2s3d4f5g6h7j8k9l0p1o2i3u4y5t6r7e8w9q0a1s2d3f4g5h6(\\/.*)?$/;
|
| 388 |
if (!allowed.test(window.location.pathname)) {
|
| 389 |
document.body.innerHTML = '<h1 style="color:#ef4444;font-family:sans-serif;text-align:center;margin-top:100px;">500 Internal Server Error</h1>';
|
| 390 |
throw new Error('500');
|
|
|
|
| 431 |
|
| 432 |
app = FastAPI()
|
| 433 |
demo = create_demo()
|
| 434 |
+
app.mount("/m5n6b7v8c9x0z1a2s3d4f5g6h7j8k9l0p1o2i3u4y5t6r7e8w9q0a1s2d3f4g5h6", demo.app)
|
| 435 |
|
| 436 |
@app.get("/{path:path}")
|
| 437 |
async def catch_all(path: str):
|