mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
drive/driveimpl: do not serve WebDAV on tvOS
Fixes tailscale/tailscale#13765 There is no need to serve a local filesystem on tvOS, given that there is no filesystem there. Disable it with a platform check. There are likely more platforms that we can exclude. Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
This commit is contained in:
parent
fb420be176
commit
18eada499b
@ -14,6 +14,7 @@
|
||||
"tailscale.com/drive/driveimpl/compositedav"
|
||||
"tailscale.com/drive/driveimpl/dirfs"
|
||||
"tailscale.com/types/logger"
|
||||
"tailscale.com/version"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -55,6 +56,11 @@ type FileSystemForLocal struct {
|
||||
}
|
||||
|
||||
func (s *FileSystemForLocal) startServing() {
|
||||
if version.IsAppleTV() {
|
||||
s.logf("won't serve taildrive on Apple TV")
|
||||
return
|
||||
}
|
||||
|
||||
hs := &http.Server{Handler: s.h}
|
||||
go func() {
|
||||
err := hs.Serve(s.listener)
|
||||
|
Loading…
Reference in New Issue
Block a user