caddy/conf.d/matrix.boba.best

165 lines
5.0 KiB
Plaintext
Raw Normal View History

2021-08-01 16:59:16 -05:00
# vim: ft=caddyfile
matrix.boba.best {
encode zstd gzip
2021-09-04 16:47:16 -05:00
import hsts
2021-08-01 16:59:16 -05:00
import matrix-well-known
2021-08-01 16:59:16 -05:00
redir /admin /admin/
handle_path /admin/* {
file_server {
root /var/www/synapse-admin/build
}
}
@generic {
# Sync requests
path /_matrix/client/*/events
# Federation requests
path /_matrix/federation/v1/event/*
path /_matrix/federation/v1/state/*
path /_matrix/federation/v1/state_ids/*
path /_matrix/federation/v1/backfill/*
path /_matrix/federation/v1/get_missing_events/*
path /_matrix/federation/v1/publicRooms*
path /_matrix/federation/v1/query/*
path /_matrix/federation/v1/make_join/*
path /_matrix/federation/v1/make_leave/*
path /_matrix/federation/v1/send_join/*
path /_matrix/federation/v2/send_join/*
path /_matrix/federation/v1/send_leave/*
path /_matrix/federation/v2/send_leave/*
path /_matrix/federation/v1/invite/*
path /_matrix/federation/v2/invite/*
path /_matrix/federation/v1/query_auth/*
path /_matrix/federation/v1/event_auth/*
path /_matrix/federation/v1/exchange_third_party_invite/*
path /_matrix/federation/v1/user/devices/*
path /_matrix/federation/v1/get_groups_publicised
path /_matrix/key/v2/query
path /_matrix/key/v2/query/*
2021-09-14 08:26:00 -05:00
path /_matrix/federation/unstable/org.matrix.msc2946/spaces/*
path /_matrix/federation/unstable/org.matrix.msc2946/hierarchy/*
2021-08-01 16:59:16 -05:00
# Client API requests
path /_matrix/client/*/createRoom
2021-08-01 16:59:16 -05:00
path /_matrix/client/*/publicRooms
path /_matrix/client/*/rooms/*/joined_members
path /_matrix/client/*/rooms/*/context/*
path /_matrix/client/*/rooms/*/members
path /_matrix/client/*/rooms/*/state
2021-09-14 08:26:00 -05:00
path /_matrix/client/unstable/org.matrix.msc2946/rooms/*/spaces
path /_matrix/client/unstable/org.matrix.msc2946/rooms/*/hierarchy
path /_matrix/client/unstable/im.nheko.summary/rooms/*/summary
2021-08-01 16:59:16 -05:00
path /_matrix/client/*/account/3pid
path /_matrix/client/*/devices
path /_matrix/client/*/keys/query
path /_matrix/client/*/keys/changes
path /_matrix/client/versions
path /_matrix/client/*/voip/turnServer
path /_matrix/client/*/joined_groups
path /_matrix/client/*/publicised_groups
path /_matrix/client/*/publicised_groups/*
path /_matrix/client/*/rooms/*/event/*
path /_matrix/client/*/joined_rooms
path /_matrix/client/*/search
# Registration/login requests
path /_matrix/client/*/login
path /_matrix/client/*/register
path /_matrix/client/unstable/org.matrix.msc3231/register/org.matrix.msc3231.login.registration_token/validity
2021-08-01 16:59:16 -05:00
# Event sending requests
path /_matrix/client/*/rooms/*/redact
path /_matrix/client/*/rooms/*/send
path /_matrix/client/*/rooms/*/state/*
path_regexp /_matrix/client/*/rooms/*/(join|invite|leave|ban|unban|kick)$
path /_matrix/client/*/join/*
path /_matrix/client/*/profile/*
# Additionally, the following REST endpoints can be handled for GET requests:
path /_matrix/federation/v1/groups/*
}
@generic_iphash {
path /_matrix/client/*/rooms/*/messages
# Sync requests (again)
path /_matrix/client/*/sync
path /_matrix/client/*/initialSync
path /_matrix/client/*/rooms/*/initialSync
# Inbound federation transaction request
path /_matrix/federation/v1/send/*
}
@media {
path /_matrix/media/*
path /_synapse/admin/v1/purge_media_cache
path /_synapse/admin/v1/room/*/media*
path /_synapse/admin/v1/user/*/media*
path /_synapse/admin/v1/media/*
path /_synapse/admin/v1/quarantine_media/*
path /_synapse/admin/v1/users/*/media
2021-08-01 16:59:16 -05:00
}
handle @generic {
reverse_proxy {
to localhost:8010
to localhost:8011
to localhost:8012
to localhost:8013
2021-08-01 16:59:16 -05:00
lb_policy round_robin
health_uri /health
health_interval 15s
health_timeout 5s
}
}
handle @generic_iphash {
reverse_proxy {
to localhost:8010
to localhost:8011
to localhost:8012
to localhost:8013
2021-08-01 16:59:16 -05:00
lb_policy ip_hash
health_uri /health
health_interval 15s
health_timeout 5s
}
}
handle @media {
reverse_proxy {
2021-08-28 20:52:35 -05:00
to localhost:8000
health_uri /healthz
2021-08-01 16:59:16 -05:00
health_interval 15s
health_timeout 5s
2021-08-28 20:52:35 -05:00
header_up Host boba.best
2021-08-01 16:59:16 -05:00
}
}
handle /_matrix/* {
reverse_proxy localhost:8008
}
handle /_synapse/client/* {
reverse_proxy localhost:8008
}
handle /_synapse/admin/* {
reverse_proxy localhost:8008
}
handle {
redir https://boba.best/services/bobachat/
2021-08-01 16:59:16 -05:00
}
import basicerrors
}