HandleUrl serving Library

I want to use the handleUrl to serve up some javascript libraries and various framework add-ons.

If I’m passing a file back, can I use the request.File?
What else has to get set?

Here’s what I have so far:

if Request.Path <> "" and request.path.left(16) = "bower_components" then dim f as FolderItem = GetFolderItem(Request.Path) if f <> nil and f.Exists then Request.File = f Request.Status = 200 break end end

Any other security concerns?

I have the HandleUrl accessing all the library files but I’m getting the following alert in Chrome

Is this ok or can I do something to fix this (change the MIME type?)

Set Request.MIMEType. Also, don’t forget to return True.

Thanks Greg,

I figured out the return true part. But I’ll probably just have to parse the file extension and then manually map them to the proper MIMETypes. I think there’s only 4 types the libraries need for resources (html, js, png, svg).