Azure / azure-relay-aspnetserver

ASP.NET Core Hosting for Azure Relay
Other
15 stars 27 forks source link

Listen to localhost #6

Open raymond-holmboe opened 6 years ago

raymond-holmboe commented 6 years ago

I'm trying to run a listener at localhost while at the same time listening to azure relay. Adding options.UrlPrefixes.Add("http://localhost:5000") gave me the exception System.ArgumentNullException: 'Value cannot be null.' Also tried adding URL's and Kestrel .UseKestrel().UseUrls("http://localhost:5000", "http://*:80"), but those were overridden by UrlPrefixes. Is it possible at all? My motivation to get this working is I could not get Swagger UI to render properly with UseAzureRelay(), see SO post

TFTomSun commented 4 years ago

I have the same issue, that the Swagger UI is not properly rendered over the Azure Relay. Hmm... the issue is already 2 years old and nobody seems to care. @dlstucki Would someone pick it up, if I provide a public github repository?

This is how it looks like, when you try to access the swagger UI via the azure relay: image

the swagger.json file that is delivered to the browser looks like this:

<feed xmlns="http://www.w3.org/2005/Atom"><title type="text">Publicly Listed Services</title><subtitle type="text">This is the list of publicly-listed services currently available.</subtitle><id>uuid:50aa6ace-1d00-4162-a763-76b3e27b9447;id=48866</id><updated>2020-06-21T20:33:43Z</updated><generator>Service Bus 1.1</generator></feed>

... which is of course no swagger file ;-)

I can see in the browser that the swagger.json file is the only one that is loaded via fetch: image

Might that be the reason why the relay returns something else?