Thanks to visit codestin.com
Credit goes to github.com

Skip to content

serve/http: add --disable-dir-list flag#9414

Open
acme wants to merge 1 commit into
rclone:masterfrom
acme:acme/serve-http-disable-dir-list
Open

serve/http: add --disable-dir-list flag#9414
acme wants to merge 1 commit into
rclone:masterfrom
acme:acme/serve-http-disable-dir-list

Conversation

@acme
Copy link
Copy Markdown
Contributor

@acme acme commented May 9, 2026

What is the purpose of this change?

Previously, GET requests for a directory URL always returned an HTML directory listing. There was no way to suppress this, unlike serve webdav which has supported --disable-dir-list for a while.

This adds the same flag to serve http. When set, GET requests for directory URLs return 404 instead of a listing, while file downloads continue to work normally.

Based on the approach suggested in #6306.

Fixes #4000

Was the change discussed in an issue or in the forum before?

In #4000 and #6306.

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

Previously, GET requests for a directory URL always returned an HTML
directory listing. There was no way to suppress this, unlike
`serve webdav` which has supported --disable-dir-list since rclone#4191.

This adds the same flag to `serve http`. When set, GET requests for
directory URLs return 404 instead of a listing, while file downloads
continue to work normally.

Based on the approach suggested in rclone#6306.

Fixes rclone#4000
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.

Feature Request - please support --disable-dir-list for serve http

1 participant