-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Thanks for this code which I have purloined for my own needs.
However, I also ran into the problem of requiring Azure to run the code (can't work how to run a proxy using the local tooling). I think this is similar to #4
However, once I thought about it I realized that I could just use a wildcard route for the function which worked just as well. Why do we need the proxy?
[FunctionName("Client")]
public static async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "client/{*route}")]HttpRequest req, ILogger log, string route)
{
try
{
log.LogInformation(route);
var filePath = GetFilePath(route);
var stream = new FileStream(filePath, FileMode.Open);
return new FileStreamResult(stream, GetMimeType(filePath));
}
. . . Metadata
Metadata
Assignees
Labels
No labels