263 views
 owned this note
# Caddy - GitHub reverse proxy 2022 UPDATE: added `robots.txt` to prevent being indexed by Google (and other search engines) 2023 UPDATE: added regexp rule to block non-repo paths (login pages etc.) 2023 UPDATE 2: updated regexp rule to allow `/<username>.png` ```= github.yuuza.net { @shouldProxy path_regexp (/.*/.*|/[^/]+\.png) handle @shouldProxy { reverse_proxy https://github.com { header_up -X-Forwarded-For header_up -X-Forwarded-Proto header_up Host github.com } } handle /robots.txt { respond ` User-agent: * Disallow: / ` } handle * { respond `USAGE ---------------- Clone a repo: git clone https://github.yuuza.net/<user>/<repo>.git Add a new remote for existing repo: git remote add ghyuuza https://github.yuuza.net/<user>/<repo>.git Or, replace an existing remote: git remote set-url origin https://github.yuuza.net/<user>/<repo>.git PRIVACY ---------------- Currently, this service do not log any information. HOW IT WORKS? ---------------- https://md.yuuza.net/s/U52dzJZWd (Powered by Caddy - The Ultimate Server with Automatic HTTPS) ` } encode gzip } ```