Closed bateskevin closed 5 years ago
@Tiberriver256 Thanks for the feedback! I agree with your suggested changes. How does this usually work? Should I implement these Changes on my fork and make a new PR? I've never done this before :)
If you make changes on your StaticRoutesDefaultFiles branch this pull request should automatically pick up on those changes and should highlight what's changed in the latest commits on that branch.
Ok, I'll try to apply the changes you suggested this weekend if I find some time.
gentle ping @bateskevin don't want this PR to disappear!
@TylerLeonhardt - I updated with the suggested changes. I believe I've got it ready if you want to give it a quick look over when you get a chance.
I feel like there's some awkwardness around having a default file and a directory browser enabled at the same time. I'm not 100% sure what to do about it though. I was thinking parameter sets but ended up going with defaulting the directory browser to false, let me know if you have any other ideas.
Sorry for the delay! I think the behavior we're looking for is like what python does with:
python -m SimpleHTTPServer 8000
if there's a default file in the directory, we load that. If there is no default file, then we load the directory browser.
I'm not married to that idea though. What do you think @Tiberriver256?
Sounds good to me. So I set the default value for directory browser and default files to true and made sure the check for default files is above the check to see if the $localpath variable is a container.
Should match python simpleHttpServer now.
@TylerLeonhardt - Could you kick off the tests one more time for this? I think I should have it now.
why do they disappear sometimes 😆 Kicked 👍
Hey folks, sorry this went a little under my radar. Had no time to code in the last few weeks in my time off. Glad to see that this could be completed tho!
@bateskevin - No problem man. Thanks so much for getting this started. Jump on another one any time if you like :)
Edited the Function New-PolarisStaticRoute.ps1 in a way, that it will recognize default files in the folderpath where it points to. The other rules still get created recursively.
Supported default files (For now. Only have to extend the array $StandardHTMLFiles to add more):
Hope this suits your needs.
Cheers, Kevin
*Edit from maintainer: Link to Issue #17