-
-
Save camnwalter/9c051015d384bbc25af409ee2bd0516d to your computer and use it in GitHub Desktop.
Private Hypixel API 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
export default { | |
async fetch(request, env, ctx) { | |
const HYPIXEL_API = "https://api.hypixel.net"; | |
const url = new URL(request.url); | |
return fetch( | |
`${HYPIXEL_API + url.pathname}?${url.searchParams}`, | |
{ | |
headers: { | |
"API-Key": env.API_KEY, | |
}, | |
} | |
); | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment