the least we can say is that I am not a github expert; also, I allow myself to make the following suggestion here.
In my eyes, the function `“isSymlinkTargetDir()”
of “browse.go” has not yet been updated on the official caddy github at
‘caddyserver/caddy/caddyhttp/browse.go’.
I have seen the ‘1667’ commit : well done for the template.
I believed that this line :
target, err := config.Fs.Root.Open(path.Join(urlPath, f.Name()))
pointed to the link itself, not to the file or dir pointed to. ==> I made a mistake !
In reality, you give a try to the symlink trying to open it inside the jailed FileSystem
(but the linked file or dir could be located outside ?).
Using “os.Readlink(f.Name())” and “…os.Lstat(target)” should be another way,
Less safe ? Faster ? Maybe not.
Thank you very much ; my excuse: it’s not so simple.