This file contains 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
// Adjust proxy server to rewrite URLs | |
// Main proxy route that handles all incoming requests | |
// Takes a URL parameter that specifies which resource to proxy | |
app.get("/proxy/:url", async (req, res) => { | |
// Decode the URL parameter since it comes URL-encoded | |
const url = decodeURIComponent(req.params.url); | |
// Create URL object to help with resolving relative URLs later | |
const baseUrl = new URL(url); | |
try { |
This file contains 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
FROM debian:bookworm-slim | |
# Install build dependencies and Perl modules | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
libpcre3 \ | |
libpcre3-dev \ | |
zlib1g \ | |
zlib1g-dev \ | |
libssl-dev \ |