10

I am building an app using firebase that needs to load an external webpage under an internal url i.e. when you go to myapp.com/edit it requests the content from someotherapp.com/edit and renders it in the browser without redirecting. I've tried using firebase hosting rewrites, but you can only rewrite to an internal url or a cloud function.

1 Answer 1

6

What you're describing cannot be accomplished with rewrites, as those (as you say) can only rewrite to a location on the same server.

A redirect would allow you to redirect to a different server, but that new URL is then sent to the browser.

The only alternative option is to use Cloud Functions or Cloud Run to capture all requests, read from the remote server in that code, and then send that back to the client with a suitable caching interval.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.