42 lines
1012 B
YAML
42 lines
1012 B
YAML
apiVersion: traefik.io/v1alpha1
|
|
kind: Middleware
|
|
metadata:
|
|
name: webfinger-cors
|
|
namespace: mastodon
|
|
spec:
|
|
headers:
|
|
customResponseHeaders:
|
|
Access-Control-Allow-Origin: "*"
|
|
---
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: Middleware
|
|
metadata:
|
|
name: webfinger-redirect
|
|
namespace: mastodon
|
|
spec:
|
|
redirectRegex:
|
|
regex: ^https://brunner\.ninja/(.*)
|
|
replacement: https://social.brunner.ninja/${1}
|
|
permanent: true
|
|
---
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: brunner-ninja-webfinger
|
|
namespace: mastodon
|
|
spec:
|
|
entryPoints:
|
|
- websecure
|
|
routes:
|
|
- kind: Rule
|
|
# Keep apex-domain Fediverse discovery on Mastodon, but leave the
|
|
# Matrix discovery namespace to Synapse.
|
|
match: Host(`brunner.ninja`) && PathPrefix(`/.well-known/`) && !PathPrefix(`/.well-known/matrix/`)
|
|
priority: 1000
|
|
middlewares:
|
|
- name: webfinger-cors
|
|
- name: webfinger-redirect
|
|
services:
|
|
- name: mastodon-web
|
|
port: http
|