I have an application running on port 3000 and this one has an iframe that calls the URL example.com:8765/page1/min/?var1=test.
What I would like is to hide this URL in the iframe code using redbird to create the reverse code, so I tried to create something like this:
var redbird = new require ('redbird') ({
port: 9000,
ssl: {
port: 8443,
key: 'certs / dev-key.pem',
cert: 'certs / dev-cert.pem',
ca: 'certs / dev-cert.ca',
}
});
// This is where I try to create the route so I can call my-new-url.com in the iframe of the app instead of the actual URL.
redbird.register ('my-new-url.com', 'https://example.com:8765/page1/min/?var1=test', {ssl: true});
// This I created in order to load my app on the base server URL created by redbird
redbird.register ('localhost:', 'localhost: 3000', {ssl: true});
When accessing localhost: 9000 loads the header and footer of my app however the central content that should be loaded in the iframe does not load, I get the message `The IP address of the my-new-url.com server could not be found.
If I access my-new-url.com directly in the browser the same error that appears in the iframe.
If I access localhost: 9000 / my-new-url.com directly in the browser the error Can not GET / my-new-url.com
I think I'm making some logical mistake about how I should put this solution in place, could anyone give me strength in this?