azure-relay-bridge icon indicating copy to clipboard operation
azure-relay-bridge copied to clipboard

Using the HTTP feature - path issues with websites using absolute paths for typical files such as /css/main.css

Open colinrippeyfinarne opened this issue 1 year ago • 0 comments

I'm trying to get the HTTP -H feature working but from what I can tell the "path" I browse to seems to be getting in the way for the backend website.

If I have a backend website on-prem sitting listening on bog standard http://localwebsite.localdomain.local port 80.

I create an Azure Relay with the name mylocalwebsitebridge

In this relay I add a hybrid connection without authentication to test: localwebsiteanon.

I then RDP onto an on-prem server, I can open a browser and happily browse to http://localwebsite.localdomain.local so this server can reach the endpoint.

On this on-prem server I then run azbridge from a command prompt:

azbridge -H localwebsiteanon:http/localwebsite.localdomain.local:80 -e

If I then from a separate machine (not part of the on-prem network) open a browser and browse to:

https://mylocalwebsitebridge.servicebus.windows.net/localwebsiteanon

I get "some" traffic back, but the page for this specific website won't render correctly as I suspect the browser is being asked to retrieve css, js files using absolute paths such as /css/main.css and the routing of the /css/main.css won't work as the browser is "rooted" off of /localwebsiteanon

Is this basically a "I need to host a website that uses relative paths" instead of the typical absolute paths such as /css/main.css

colinrippeyfinarne avatar Sep 08 '23 15:09 colinrippeyfinarne