mirror of
https://github.com/caddyserver/caddy.git
synced 2025-12-08 06:09:53 +00:00
fileserver: Browse can show symlink target if enabled (#5973)
* Added optional subdirective to browse allowing to reveal symlink paths. * Update modules/caddyhttp/fileserver/browsetplcontext.go --------- Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
This commit is contained in:
parent
a7479302fc
commit
feb07a7b59
5 changed files with 50 additions and 18 deletions
|
|
@ -962,7 +962,15 @@ footer {
|
|||
<td>
|
||||
<a href="{{html .URL}}">
|
||||
{{template "icon" .}}
|
||||
{{- if not .SymlinkPath}}
|
||||
<span class="name">{{html .Name}}</span>
|
||||
{{- else}}
|
||||
<span class="name">{{html .Name}} <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-narrow-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l14 0" />
|
||||
<path d="M15 16l4 -4" />
|
||||
<path d="M15 8l4 4" />
|
||||
</svg> {{html .SymlinkPath}}</span>
|
||||
{{- end}}
|
||||
</a>
|
||||
</td>
|
||||
{{- if .IsDir}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue