hasura / hasura/graphql-engine
Custom root url
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
I'd like to be able to configure a non-standard root url for hasura, e.g. `/api/*`.
It's nearly impossible in my (mostly free tier) setup:
* AWS ELB does not support path rewrites
* CloudFlare DNS only allows `regex_replace` function to be used in business/enterprise plan
* nginx as a reverse proxy adds overhead slowing down all requests, and to be honest its image wouldn't fit together with Hasura on a single free-tier T3.micro EC2 instance with 1GB RAM
### Describe the solution you'd like
I'd be happy if there was a single environment variable allowing me to specify non-root path on which Hasura would run all its operations. I'd imagine it's not such a big deal to configure on which path the server would listen for traffic?
### Describe alternatives you've considered
Pretty much what mentioned above:
* Tried setting this up at load balancer level, but AWS ALB doesn't have this feature
* Setting up CloudFront with Edge Lambdas just for this purpose would be a total overkill and likely a real wallet drain
* Setting up rules in CloudFlare which serves as DNS - only paid options allow path rewrites
* Adding nginx as reverse proxy - too much overhead and requires too much resources
### If the feature is approved, would you be willing to submit a PR?
Not really, I wouldn't have the foggiest idea where to start
Contributor guide
Assessment
This issue has not been assessed yet.