apps/obsidian/resources/http_routes.yaml
Peter Kurfer bcc0b7c2bc
Some checks failed
Renovate / renovate (push) Has been cancelled
feat(obsidian): deploy CouchDB for Obsidian sync
2024-03-13 17:51:26 +01:00

56 lines
No EOL
1.4 KiB
YAML

---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: obsidian-db-http
spec:
parentRefs:
- name: contour
sectionName: http
namespace: projectcontour
hostnames:
- obsidian-db.icb4dc0.de
rules:
- filters:
- type: RequestRedirect
requestRedirect:
scheme: https
statusCode: 301
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: obsidian-db-https
spec:
parentRefs:
- name: contour
sectionName: https
namespace: projectcontour
hostnames:
- obsidian-db.icb4dc0.de
rules:
- matches:
- method: OPTIONS
headers:
- name: Origin
value: 'app://obsidian.md'
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
add:
- name: Access-Control-Allow-Origin
value: 'app://obsidian.md'
- name: Access-Control-Allow-Methods
value: 'GET,PUT,POST,HEAD,DELETE'
- name: Access-Control-Allow-Credentials
value: 'true'
- name: Access-Control-Allow-Headers
value: 'accept,authorization,content-type,origin,referer'
- name: Access-Control-Max-Age
value: '3600'
backendRefs:
- name: caddy-hack
port: 8080
- backendRefs:
- name: obsidian-svc-couchdb
port: 5984