- Add daily request limit per IP in blacklist settings (1-1,000,000/day) - Refactor access control logic: merge blacklist and rate limit checks - Remove RATE_LIMIT_API_DAILY_REQUESTS env var, use database config instead - Move x-custom-auth check earlier in middleware chain - Add comprehensive English documentation (31 new guide pages) - Improve code structure and error handling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
3.7 KiB
Cloudflare Pages Frontend
<script setup> import { ref } from 'vue' import JSZip from 'jszip'; const domain = ref("") const downloadUrl = ref("") const tip = ref("Download") const generate = async () => { try { const response = await fetch("/ui_install/frontend.zip"); const arrayBuffer = await response.arrayBuffer(); var zip = new JSZip(); await zip.loadAsync(arrayBuffer); let target_content = "" let target_path = "" const directory = zip.folder("assets"); if (directory) { for (const [relativePath, zipEntry] of Object.entries(directory.files)) { console.log(relativePath); if (relativePath.startsWith("assets/index-") && relativePath.endsWith(".js")){ let content = await zipEntry.async("string"); content = content.replace("https://temp-email-api.xxx.xxx", domain.value); target_path = relativePath; zip.file(relativePath, content); break; } } } if (!target_path) { tip.value = "Generation failed"; downloadUrl.value = ''; } const blob = await zip.generateAsync({ type: "blob" }); const url = window.URL.createObjectURL(blob); downloadUrl.value = url; } catch (error) { console.error("Error: ", error); } } </script>-
Click
Compute (Workers)->Workers & Pages->Create -
Select
Pages, chooseUse direct upload -
Enter the address of the deployed worker. The address should not include a trailing
/. Click generate, and if successful, a download button will appear. You will get a zip package.- The worker domain here is the backend API domain. For example, if I deployed at
https://temp-email-api.awsl.uk, then fill inhttps://temp-email-api.awsl.uk - If your domain is
https://temp-email-api.xxx.workers.dev, then fill inhttps://temp-email-api.xxx.workers.dev
[!warning] Note The
worker.devdomain is not accessible in China, please use a custom domain.Generate {{ tip }}Note
You can also deploy manually. Download the zip from here: frontend.zip
Modify the index-xxx.js file in the archive, where xx is a random string
Search for
https://temp-email-api.xxx.xxxand replace it with your worker's domain, then deploy the new zip file - The worker domain here is the backend API domain. For example, if I deployed at
-
Select
Pages, clickCreate Pages, modify the name, upload the downloaded zip package, and then clickDeploy -
Open the
Pagesyou just deployed, clickCustom Domain. Here you can add your own domain, or you can use the automatically generated*.pages.devdomain. If you can open the domain, the deployment is successful.



