Reputation: 570
I'm new to the GCP Services, and I'm trying to make an API Gateway to proxy two services, one is run on an App Engine and the other is actually a PaaS.
Can I configure Cloud Endpoints to redirect to that PaaS, and how? and if now what service in GCP suits this case?
Edit: An example of what I'm trying to do is if my domain is test.com then i'd like app.test.com to be redirected to my App Engine and ip.test.com would be directed for example to https://httpbin.org/ip.
Upvotes: 1
Views: 1619
Reputation: 75775
I wrote an article on this for securing the endpoint. Set the value that you want in the x-google-backend
.
I also provide some tips about the URL rewriting if you want.
EDIT 1
If you want to perform this routing
You need to use a HTTPS Load Balancer and not API Gateway.
Then,
That's all (wait 3 - 5 minutes, the delay to dispatch your configuration around the globe.)
Upvotes: 2
Reputation: 15018
Yes, you can run an Extensible Service Proxy in front of your non-GCP backend service so that Cloud Endpoints can proxy requests to it.
Docs: https://cloud.google.com/endpoints/docs/openapi/running-esp-localdev
Upvotes: 1