Since I don’t have much time and I’m just posting for public awareness will share my experience here using:
- nocodeapi
- airtable
I decided to use nocodeapi and set up my own reverse proxies to avoid exposing sensible information such as api keys frontend side and also to get api branded with my domain.
Everything went fine until I found out that ultimately, part of the reverse proxy rewriting needs to be URL encoded, otherwise it won’t work. Not sure if this is intended or not, but took some time to get it going.
So what apparently would work like this:
items.mydomain.com {
rewrite * /mydomain/airtable/nocodekey?tableName=shop_list&id={query}
reverse_proxy https://v1.nocodeapi.com {
header_up Host "v1.nocodeapi.com"
header_up X-Real-IP {http.request.remote}
header_up X-Forwarded-For {http.request.remote}
header_up X-Forwarded-Port {http.request.port}
transport http {tls}
}
}
Needs to end up rewritten like:
items.mydomain.com {
rewrite * /mydomain/airtable/nocodekey?tableName=shop_list&id=%3D%7Bquery%7D
reverse_proxy https://v1.nocodeapi.com {
header_up Host "v1.nocodeapi.com"
header_up X-Real-IP {http.request.remote}
header_up X-Forwarded-For {http.request.remote}
header_up X-Forwarded-Port {http.request.port}
transport http {tls}
}
}
Don’t try to url encode the rest of the “rewrite” text, it won’t work. It will just work with the last part of it. I had no other way but to discover this by testing out, fragment by fragment.
Just wanted to share this small steps in case anyone is having the same issues; this could save time.
Additionally, not sure if this even can be considered a bug or an issue, in this case, its not the point of this post, just setting up this small guide.
Finally to url encode easily I used https://www.urlencoder.org/ guess there are many other online options but that’s the first one that came up to me in results.