-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure directory listing #136
base: master
Are you sure you want to change the base?
Conversation
ba84d9e
to
b5d9ea4
Compare
9b5738e
to
f3e6215
Compare
@@ -55,6 +55,7 @@ const WebDav = () => { | |||
disableOldCiphers: false, | |||
tunnelId: uuidv4(), | |||
}, | |||
deactivatedirectorylisting: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deactivatedirectorylisting: false, | |
disableDirectoryListing: false, |
as in other places?
@@ -55,6 +57,7 @@ const DirectoryPage = () => { | |||
disableOldCiphers: false, | |||
tunnelId: uuidv4(), | |||
}, | |||
deactivatedirectorylisting: disableDirectoryListing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deactivatedirectorylisting: disableDirectoryListing | |
disableDirectoryListing, |
as in other places?
@@ -5,4 +5,5 @@ import RemoteEndpointSpecs from './RemoteEndpointSpecs'; | |||
export default interface ExposeDirectoryMessage { | |||
local: LocalDirectorySpecs; | |||
remote: RemoteEndpointSpecs; | |||
deactivatedirectorylisting: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deactivatedirectorylisting: boolean; | |
disableDirectoryListing: boolean; |
@@ -15,8 +15,9 @@ type OAuthConfig struct { | |||
|
|||
// DisplayConfig defines the display switches shape | |||
type DisplayConfig struct { | |||
Verbose bool `json:"verbose"` | |||
QR bool `json:"qr"` | |||
DisableDirectoryListing bool `json:"disabledirectorylisting"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use camelCase syntax
DisableDirectoryListing bool `json:"disabledirectorylisting"` | |
DisableDirectoryListing bool `json:"disableDirectoryListing"` |
import React from "react"; | ||
|
||
interface DirectorySettingsProps { | ||
usingValue: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why using
? I would name it value
and changeCallback
@@ -98,6 +99,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) { | |||
communication.Warn(err.Error()) | |||
} | |||
|
|||
config.Config.Display.DisableDirectoryListing = exposeDirectoryConfig.DisableDirectoryListing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would not use Display
for that, they are not really for it. It's rather remoteEndpointSpecs
the same way as here: https://github.com/loophole/cli/blob/master/cmd/http.go#L72
Initial commit shows 404 when --disable-directory-listing flag is used and requested path is a directory, will look into the feasibility of showing a custom page instead.