|
|
|
<!DOCTYPE html> |
|
<html lang="en"> |
|
|
|
<head> |
|
<meta charset="UTF-8"> |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
<title>OPENAI Reverse Proxy</title> |
|
|
|
<style> |
|
|
|
.container { |
|
max-width: 800px; |
|
margin: 0 auto; |
|
padding: 20px; |
|
background-color: #fff; |
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
|
border-radius: 5px; |
|
} |
|
|
|
.text-center { |
|
text-align: center; |
|
} |
|
|
|
.lead { |
|
font-size: 18px; |
|
color: #555; |
|
} |
|
|
|
.url { |
|
color: #007bff; |
|
font-weight: bold; |
|
} |
|
</style> |
|
</head> |
|
|
|
<body> |
|
<div class="container"> |
|
<h1 class="text-center">Welcome to OPENAI Reverse Proxy</h1> |
|
<p class="lead">This is your OpenAI Reverse Proxy URL:</p> |
|
<p class="url" id="reverseProxyUrl"></p> |
|
</div> |
|
|
|
|
|
<script> |
|
|
|
function getExternalUrl(spaceId) { |
|
try { |
|
const [username, spacename] = spaceId.split("/"); |
|
return `https://${username}-${spacename.replace(/_/g, "-")}.hf.space/api/v1`; |
|
} catch (e) { |
|
return ""; |
|
} |
|
} |
|
|
|
|
|
const spaceId = "ngoctuanai/openaiproxy"; |
|
const reverseProxyUrl = getExternalUrl(spaceId); |
|
document.getElementById("reverseProxyUrl").textContent = reverseProxyUrl; |
|
</script> |
|
</body> |
|
|
|
</html> |