remove apiKey from client code
To avoid to have apikeys client side, we can add proxy definitions in staticserve configuration at the risk of creating bottlenecks
proxy:
- from: /plausible/
to: https://plausible.host/api/v1/
headers:
- Authorization: Bearer key
- from: /meilisearch/
to: https://meilisearch.host/
headers:
- Authorization: Bearer key
We can also probably resolve this at the mesh level. For example with contour using request rewriting
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
name: plausible
namespace: blog
spec:
virtualhost:
fqdn: blog.example.com
routes:
- services:
- name: plausible.plausible
port: 8000
conditions:
- prefix: /plausible
pathRewritePolicy:
replacePrefix:
- replacement: /api/v1
requestHeadersPolicy:
set:
- name: Authorization
value: Bearer key