Compare commits
22 Commits
8d96cb6de2
...
master
Author | SHA1 | Date | |
---|---|---|---|
9d23147758 | |||
a2c85d9493 | |||
481f2eab47 | |||
e90e69c611 | |||
a7076a3e3d | |||
c511214a11 | |||
9f7055d054 | |||
a04f3b54fc | |||
21dc225361 | |||
3e4ae36359 | |||
d97b572fa3 | |||
a26b936989 | |||
2ac6af6b5c | |||
44312da34c | |||
6e70a8750d | |||
e9add61c7b | |||
dc48f2a971 | |||
85d45068ae | |||
3279951295 | |||
024579aefe | |||
7efc3cce37 | |||
1588eabd22 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1 @@
|
|||||||
email
|
email
|
||||||
|
|
||||||
errors/img
|
|
||||||
|
@ -1,16 +1,27 @@
|
|||||||
# vim: ft=caddyfile
|
# vim: ft=caddyfile
|
||||||
|
|
||||||
www.bbaovanc.com {
|
www.bbaovanc.com, boba.best, www.boba.best {
|
||||||
redir https://bbaovanc.com{uri}
|
import hsts
|
||||||
|
redir https://bbaovanc.com{uri} 308
|
||||||
}
|
}
|
||||||
|
|
||||||
bbaovanc.com {
|
bbaovanc.com {
|
||||||
import hsts
|
import hsts
|
||||||
|
|
||||||
|
redir /contact /
|
||||||
|
redir /contact/ /
|
||||||
|
redir /blog/links/ /links/
|
||||||
|
redir /blog/posts /blog/
|
||||||
|
redir /blog/posts/ /blog/
|
||||||
|
handle_path /blog/posts/* {
|
||||||
|
redir * /blog{uri}
|
||||||
|
}
|
||||||
|
redir /blog/sed-text-substitution-in-discord/ /blog/text-substitution-in-discord-using-sed/
|
||||||
|
|
||||||
header Cache-Control no-cache
|
header Cache-Control no-cache
|
||||||
root * /var/www/bbaovanc.com/public
|
root * /var/www/bbaovanc.com/public
|
||||||
file_server {
|
file_server {
|
||||||
precompressed br gzip
|
precompressed zstd br gzip
|
||||||
}
|
}
|
||||||
|
|
||||||
import basicerrors
|
import basicerrors
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
www.brainman.org {
|
|
||||||
redir https://brainman.org{uri}
|
|
||||||
}
|
|
||||||
|
|
||||||
brainman.org {
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
header Cache-Control no-cache
|
|
||||||
root * /var/www/brainman.org/public
|
|
||||||
file_server {
|
|
||||||
precompressed br gzip
|
|
||||||
}
|
|
||||||
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
commento.bbaovanc.com {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
reverse_proxy localhost:83
|
|
||||||
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -3,11 +3,20 @@
|
|||||||
demo.bbaovanc.com {
|
demo.bbaovanc.com {
|
||||||
import hsts
|
import hsts
|
||||||
|
|
||||||
header Cache-Control no-store
|
|
||||||
header X-Robots-Tag noindex
|
|
||||||
root * /var/www/demo.bbaovanc.com
|
root * /var/www/demo.bbaovanc.com
|
||||||
file_server {
|
handle /staging/* {
|
||||||
browse
|
header Cache-Control no-cache
|
||||||
|
file_server {
|
||||||
|
browse
|
||||||
|
precompressed br gzip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
handle {
|
||||||
|
header Cache-Control no-store
|
||||||
|
header X-Robots-Tag noindex
|
||||||
|
file_server {
|
||||||
|
browse
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
import basicerrors
|
import basicerrors
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
dorito.boba.best {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
redir https://discord.gg/NZWzSCY5UE
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
errors.bbaovanc.com {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
root * /etc/caddy/errors/img
|
|
||||||
file_server
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
flower.boba.best {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
root * /var/www/flower.boba.best
|
|
||||||
handle {
|
|
||||||
rewrite * /flowerpet.gif
|
|
||||||
file_server
|
|
||||||
}
|
|
||||||
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
forum.bbaovanc.com {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
handle /app/* {
|
|
||||||
reverse_proxy localhost:2083
|
|
||||||
}
|
|
||||||
|
|
||||||
root * /var/www/forum.bbaovanc.com/public
|
|
||||||
php_fastcgi unix//run/php/php-fpm.sock
|
|
||||||
header /assets/* {
|
|
||||||
+Cache-Control "public, must-revalidate, proxy-revalidate"
|
|
||||||
+Cache-Control "max-age=25000"
|
|
||||||
Pragma "public"
|
|
||||||
}
|
|
||||||
file_server
|
|
||||||
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
furry.boba.best {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
root * /var/www/furry.boba.best
|
|
||||||
handle {
|
|
||||||
rewrite * /alien_furry.gif
|
|
||||||
file_server
|
|
||||||
}
|
|
||||||
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -4,14 +4,22 @@ git.bbaovanc.com {
|
|||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
import hsts
|
import hsts
|
||||||
|
|
||||||
handle_path /_/static/assets/* {
|
|
||||||
root * /var/www/git.bbaovanc.com/public
|
|
||||||
file_server
|
|
||||||
}
|
|
||||||
|
|
||||||
handle {
|
handle {
|
||||||
reverse_proxy localhost:81 {
|
reverse_proxy localhost:81 {
|
||||||
header_up X-Real-IP {remote_host}
|
header_up X-Real-IP {remote_host}
|
||||||
|
|
||||||
|
#@404 status 404
|
||||||
|
#handle_response @404 {
|
||||||
|
# handle /bbaovanc/* {
|
||||||
|
# root * /etc/caddy/github-redirect/
|
||||||
|
# rewrite * /index.php?uri={uri}
|
||||||
|
# php_fastcgi unix//run/php/php-fpm.sock
|
||||||
|
# }
|
||||||
|
|
||||||
|
# handle {
|
||||||
|
# copy_response
|
||||||
|
# }
|
||||||
|
#}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
img.bbaovanc.com {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
root * /var/www/img.bbaovanc.com
|
|
||||||
file_server {
|
|
||||||
browse
|
|
||||||
}
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
lhci.bbaovanc.com {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
reverse_proxy localhost:87
|
|
||||||
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
linkace.bbaovanc.com {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
root * /var/www/linkace.bbaovanc.com/public
|
|
||||||
php_fastcgi unix//run/php/php-fpm.sock
|
|
||||||
|
|
||||||
header {
|
|
||||||
X-Frame-Options "SAMEORIGIN"
|
|
||||||
X-XSS-Protection "1; mode=block"
|
|
||||||
X-Content-Type-Options "nosniff"
|
|
||||||
}
|
|
||||||
|
|
||||||
@assets {
|
|
||||||
path *.css
|
|
||||||
path *.js
|
|
||||||
path *.map
|
|
||||||
path *.scss
|
|
||||||
path *.jpg
|
|
||||||
path *.jpeg
|
|
||||||
path *.png
|
|
||||||
path *.avif
|
|
||||||
path *.gif
|
|
||||||
path *.mp4
|
|
||||||
path *.woff
|
|
||||||
path *.woff2
|
|
||||||
path *.ico
|
|
||||||
path *.svg
|
|
||||||
path *.webmanifest
|
|
||||||
}
|
|
||||||
header @assets {
|
|
||||||
Test "working"
|
|
||||||
}
|
|
||||||
|
|
||||||
file_server
|
|
||||||
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
lists.bbaovanc.com {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
reverse_proxy localhost:85
|
|
||||||
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
media.bbaovanc.com {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
root * /var/www/media.bbaovanc.com
|
|
||||||
file_server {
|
|
||||||
browse
|
|
||||||
}
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
remark.bbaovanc.com {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
reverse_proxy localhost:82 {
|
|
||||||
header_up X-Real-IP {remote_host}
|
|
||||||
}
|
|
||||||
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
rick.bbaovanc.com, rick.boba.best {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
redir https://www.youtube.com/watch?v=dQw4w9WgXcQ temporary
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,77 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
search.bbaovanc.com {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
@api {
|
|
||||||
path /config
|
|
||||||
path /status
|
|
||||||
}
|
|
||||||
|
|
||||||
@static {
|
|
||||||
path /static/*
|
|
||||||
}
|
|
||||||
|
|
||||||
@morty {
|
|
||||||
path /morty/*
|
|
||||||
}
|
|
||||||
|
|
||||||
@notmorty {
|
|
||||||
not path /morty/*
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
|
||||||
# Enable cross-site filter (XSS) and tell browser to block detected attacks
|
|
||||||
X-XSS-Protection "1; mode=block"
|
|
||||||
|
|
||||||
# Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
|
|
||||||
X-Content-Type-Options "nosniff"
|
|
||||||
|
|
||||||
# Disallow the site to be rendered within a frame (clickjacking protection)
|
|
||||||
X-Frame-Options "SAMEORIGIN"
|
|
||||||
|
|
||||||
# Disable some features
|
|
||||||
Permissions-Policy "accelerometer=();ambient-light-sensor=(); autoplay=();camera=();encrypted-media=();focus-without-user-activation=(); geolocation=();gyroscope=();magnetometer=();microphone=();midi=();payment=();picture-in-picture=(); speaker=();sync-xhr=();usb=();vr=()"
|
|
||||||
|
|
||||||
# Disable some features (legacy)
|
|
||||||
Feature-Policy "accelerometer 'none';ambient-light-sensor 'none'; autoplay 'none';camera 'none';encrypted-media 'none';focus-without-user-activation 'none'; geolocation 'none';gyroscope 'none';magnetometer 'none';microphone 'none';midi 'none';payment 'none';picture-in-picture 'none'; speaker 'none';sync-xhr 'none';usb 'none';vr 'none'"
|
|
||||||
|
|
||||||
# Referer
|
|
||||||
Referrer-Policy "no-referrer"
|
|
||||||
|
|
||||||
# X-Robots-Tag
|
|
||||||
X-Robots-Tag "noindex, noarchive, nofollow"
|
|
||||||
}
|
|
||||||
|
|
||||||
header @api {
|
|
||||||
Access-Control-Allow-Methods "GET, OPTIONS"
|
|
||||||
Access-Control-Allow-Origin "*"
|
|
||||||
}
|
|
||||||
|
|
||||||
header @static {
|
|
||||||
#Cache-Control "public, max-age=31536000"
|
|
||||||
Cache-Control no-cache
|
|
||||||
defer
|
|
||||||
}
|
|
||||||
|
|
||||||
header @notmorty {
|
|
||||||
Content-Security-Policy "upgrade-insecure-requests; default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; form-action 'self'; font-src 'self'; frame-ancestors 'self'; base-uri 'self'; connect-src 'self' https://overpass-api.de; img-src 'self' data: https://*.tile.openstreetmap.org; frame-src https://www.youtube-nocookie.com https://player.vimeo.com https://www.dailymotion.com https://www.deezer.com https://www.mixcloud.com https://w.soundcloud.com https://embed.spotify.com"
|
|
||||||
}
|
|
||||||
|
|
||||||
handle @morty {
|
|
||||||
header Content-Security-Policy "default-src 'none'; style-src 'self' 'unsafe-inline'; form-action 'self'; frame-ancestors 'self'; base-uri 'self'; img-src 'self' data:; font-src 'self'; frame-src 'self'"
|
|
||||||
reverse_proxy localhost:3000
|
|
||||||
}
|
|
||||||
|
|
||||||
handle {
|
|
||||||
reverse_proxy localhost:4040 {
|
|
||||||
header_up X-Forwarded-Port {http.request.port}
|
|
||||||
header_up X-Forwarded-TlsProto {tls_protocol}
|
|
||||||
header_up X-Forwarded-TlsCipher {tls_cipher}
|
|
||||||
header_up X-Forwarded-HttpsProto {proto}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
# vim: ft=caddyfile
|
|
||||||
|
|
||||||
stib.boba.best {
|
|
||||||
encode zstd gzip
|
|
||||||
import hsts
|
|
||||||
|
|
||||||
root * /var/www/stib.boba.best
|
|
||||||
handle {
|
|
||||||
rewrite * /stib.gif
|
|
||||||
file_server
|
|
||||||
}
|
|
||||||
|
|
||||||
import basicerrors
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh -x
|
|
||||||
|
|
||||||
mkdir -p img/
|
|
||||||
cd img/
|
|
||||||
curl https://http.cat | grep -oE '[0-9]{3}\.jpg' | sort | uniq | parallel $@ 'wget -q https://http.cat/{} && echo "DL {}"'
|
|
@ -2,7 +2,7 @@
|
|||||||
{{ $text := placeholder "http.error.status_text" -}}
|
{{ $text := placeholder "http.error.status_text" -}}
|
||||||
{{ $full_text := printf "%s %s" (placeholder "http.error.status_code") (placeholder "http.error.status_text") -}}
|
{{ $full_text := printf "%s %s" (placeholder "http.error.status_code") (placeholder "http.error.status_text") -}}
|
||||||
{{ $host := placeholder "http.request.host" -}}
|
{{ $host := placeholder "http.request.host" -}}
|
||||||
{{ $img_url := (printf "https://errors.bbaovanc.com/%s.jpg" $code) -}}
|
{{ $img_url := (printf "https://http.cat/%s.jpg" $code) -}}
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>{{ $full_text }}</title>
|
<title>{{ $full_text }}</title>
|
||||||
|
7
github-redirect/index.php
Normal file
7
github-redirect/index.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$uri = $_GET["uri"];
|
||||||
|
$uri = preg_replace('/(\/bbaovanc\/.*?(?=\/))\/src\/(commit|branch)/', '$1/blob', $uri);
|
||||||
|
$uri = preg_replace('/(\/bbaovanc\/.*?(?=\/))\/(commits|blame)\/(branch|commit)/', '$1/$2', $uri);
|
||||||
|
header('Status: 301 Moved Permanently');
|
||||||
|
header('Location: https://github.com' . $uri);
|
||||||
|
?>
|
Reference in New Issue
Block a user