Spaces:
Paused
Paused
| from flask import Flask, Response, jsonify | |
| from flask_cors import CORS | |
| port = 7860 | |
| host = "0.0.0.0" | |
| app = Flask(__name__) | |
| CORS(app) | |
| def catch_all(path): | |
| # HTML content | |
| html = '''<!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Under maintenance</title> | |
| <style> | |
| body { | |
| background-color: #f5f5f5; | |
| color: #333; | |
| font-family: Arial, sans-serif; | |
| line-height: 1.5; | |
| padding: 1em; | |
| max-width: 800px; | |
| margin: 0 auto | |
| } | |
| h1, | |
| h2, | |
| h3, | |
| h4, | |
| h5, | |
| h6 { | |
| font-weight: bold; | |
| margin-top: 1.5em | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>A note from us</h1> | |
| <hr> | |
| <p>Hello, discord users and redditors. An inside man from the janitorai discord told me that you were using my proxy.</p> | |
| <p>Stop using these proxies. Most, if not all of the proxies you use are made by 4chan users.</p><p>The code that all of these reverse proxies run were made by an anonymous user on 4chan.</p> | |
| <p>You are all nothing but worthless leeches.</p> | |
| <p>We do not like you. Stop using these proxies. Make your own.</p> | |
| <hr> | |
| <p> | |
| Want to talk? Add me on Discord.<br> | |
| <strong>Discord Username: "lainchan.org"</strong> | |
| </p> | |
| </body> | |
| </html>''' | |
| # html = '''HuggingFace is, once again, currently experiencing a DDoS attack. Please check back within 24 hours. Due to being banned from the JanitorAI server under false pretenses, I am unable to properly communicate with you all. Apologies for the inconvenience. Discord tag: Moxxie#4385''' | |
| # return html | |
| return Response(html, status=403) | |
| if __name__ == '__main__': | |
| app.run(host=host, port=port) |