Skip to content
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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

denny241
Copy link
Contributor

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.

@denny241 denny241 force-pushed the feature-configure-directory-listing branch from ba84d9e to b5d9ea4 Compare July 13, 2021 13:59
@denny241 denny241 force-pushed the feature-configure-directory-listing branch from 9b5738e to f3e6215 Compare June 24, 2022 11:41
@@ -55,6 +55,7 @@ const WebDav = () => {
disableOldCiphers: false,
tunnelId: uuidv4(),
},
deactivatedirectorylisting: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
deactivatedirectorylisting: false,
disableDirectoryListing: false,

as in other places?

@@ -55,6 +57,7 @@ const DirectoryPage = () => {
disableOldCiphers: false,
tunnelId: uuidv4(),
},
deactivatedirectorylisting: disableDirectoryListing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use camelCase syntax

Suggested change
DisableDirectoryListing bool `json:"disabledirectorylisting"`
DisableDirectoryListing bool `json:"disableDirectoryListing"`

import React from "react";

interface DirectorySettingsProps {
usingValue: boolean;
Copy link
Contributor

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants