Proxy

For an ideal experience users should use a reverse proxy such as Nginx or Traefik to expose Share Me publically. Share Me supports OpenGraph and Twitter metatags to render embeds for messaging and social media apps such as Twitter, Instagram, WhatsApp and Discord.

The recommended way to expose Share Me is by forwarding /api and /_ to the PocketBase backend, and the rest of the traffic including /_next to the frontend. This can be done with Traefik path matchers or Kubernetes Intgress routes for example:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: share-me
spec:
rules:
- host: shareme.example.com
http:
paths:
- backend:
service:
name: share-me-frontend
port:
name: http
path: /
pathType: Prefix
- backend:
service:
name: share-me-frontend
port:
name: http
path: /_next
pathType: Prefix
- backend:
service:
name: share-me-server
port:
name: http
path: /api/
pathType: Prefix
- backend:
service:
name: share-me-server
port:
name: http
path: /_/
pathType: Prefix