-
Structure & Flow:
Your code follows a common Cloudflare Workers pattern:- An event listener intercepts fetch events.
- The
handleRequest()
function rewrites the incoming URL, creates a new request with modified headers, forwards it to the target server, and then post-processes the response (rewriting redirects, CORS, cookies, and even HTML content).
-
HTML Rewriting:
You’re using Cloudflare’sHTMLRewriter
to adjust links (a[href]
), images (img[src]
), and form actions (form[action]
). This is a good approach for making proxied HTML interactive through your proxy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.Random; | |
/** | |
* A small RISC-style primitive operation framework (inpsired by LuminalAI), | |
* implementing 12 primitive ops and a demo network. | |
* | |
* Inspiration: https://github.com/luminal-ai/luminal | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Worldwide", | |
"placeType": { | |
"code": 19, | |
"name": "Supername" | |
}, | |
"url": "http://where.yahooapis.com/v1/place/1", | |
"parentid": 0, | |
"country": "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"place_name": "Worldwide", | |
"country": "", | |
"woeid": 1, | |
"type": "Supername", | |
"country_code": null | |
}, | |
{ | |
"place_name": "Winnipeg", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
place_name | country | country_code | woeid | type | |
---|---|---|---|---|---|
Worldwide | 1 | Supername | |||
Winnipeg | Canada | CA | 2972 | Town | |
Ottawa | Canada | CA | 3369 | Town | |
Quebec | Canada | CA | 3444 | Town | |
Montreal | Canada | CA | 3534 | Town | |
Toronto | Canada | CA | 4118 | Town | |
Edmonton | Canada | CA | 8676 | Town | |
Calgary | Canada | CA | 8775 | Town | |
Vancouver | Canada | CA | 9807 | Town |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are Manus, an AI agent created by the Manus team. | |
You excel at the following tasks: | |
1. Information gathering, fact-checking, and documentation | |
2. Data processing, analysis, and visualization | |
3. Writing multi-chapter articles and in-depth research reports | |
4. Creating websites, applications, and tools | |
5. Using programming to solve various problems beyond development | |
6. Various tasks that can be accomplished using computers and the internet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are ChatGPT, a large language model based on the GPT-5 model and trained by OpenAI. | |
Knowledge cutoff: 2024-06 | |
Current date: 2025-08-08 | |
Image input capabilities: Enabled | |
Personality: v2 | |
Do not reproduce song lyrics or any other copyrighted material, even if asked. | |
You're an insightful, encouraging assistant who combines meticulous clarity with genuine enthusiasm and gentle humor. | |
Supportive thoroughness: Patiently explain complex topics clearly and comprehensively. | |
Lighthearted interactions: Maintain friendly tone with subtle humor and warmth. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function filterNoisyGithubCommentEmails(subject, list, days) { | |
days = (typeof days === "undefined" || days === null || isNaN(days)) ? 1 : days; | |
var query = []; | |
if (list) query.push('list:' + list); | |
if (subject) query.push('subject:"' + subject + '"'); | |
if (days) query.push('newer_than:' + days + 'd'); | |
var searchString = query.join(' '); | |
const patterns = [ |
Key Observations:
- The code implements a basic reverse proxy that:
- Routes requests through a specific domain (stratosphericus.workers.dev)
- Rewrites URLs in HTML responses
- Handles CORS
- Manages cookies
- Supports redirects
Potential Issues & Improvements:
NewerOlder