Hi, I’m trying to use the always-forward option mentioned here:
https://community.fly.io/t/litefs-http-proxy-failing-with-nextauth/15917/3
I’ve got the proxy
setup in my litefs.yml
shown below but
when I make requests to that path it doesn’t seem to be
forwarded to the primary as I get error messages like this in my logs:
2024-07-03T16:20:51.427 app[48ed640a7d7308] sjc [info] level=INFO msg="fuse: write(): wal error: read only replica"
proxy:
addr: ":8080"
target: "localhost:3000"
db: "db"
passthrough:
- "*.ico"
- "*.png"
always-forward:
- "^/always-write"
The actual requests are going to a route that looks like:
app.get('/always-write/:tag/:number', async (req, res) => {
I.e. the path will be something like /always-write/foo/10
.
Am I missing something silly?