Skip to content

Instantly share code, notes, and snippets.

View 186526's full-sized avatar

Bo Xu 186526

View GitHub Profile
@186526
186526 / 5xx.html
Last active August 7, 2023 21:27
cloudflare-custom-error
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="renderer" content="webkit" />
<meta name="force-rendering" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="preconnect" href="https://fonts.gstatic.com">
@186526
186526 / app.js
Last active September 24, 2021 14:54
sw2express Custom Default Page, Like https://sw2express-custompage.186526.workers.dev/${statusCode}
import sw2express from "sw2express";
import * as customPage from "./sw2express.customDefaultPage.js";
const app = new sw2express();
app.extend(customPage.default);
app.use(async(req,rep)=>{
const statusCode = req.path.replace("/", "");
if (!isNaN(statusCode) && customPage.codeAlternative[statusCode] !== undefined) {
console.log(statusCode);
await customPage.getPage({
statusCode: statusCode,

Keybase proof

I hereby claim:

  • I am 186526 on github.
  • I am 186526 (https://keybase.io/186526) on keybase.
  • I have a public key whose fingerprint is 11AA C9B0 85C8 5EE8 5E79 6251 C7EB 1E6B 8CC5 E51D

To claim this, I am signing this object:

@186526
186526 / cloudSettings
Created May 14, 2020 14:02
Visual Studio Code Settings Sync Gist
// Empty