Skip to content

Releases: mjpclab/go-http-file-server

Version 1.20.1

18 Oct 14:08
Compare
Choose a tag to compare

Minor improvements and fixes.


次要改进和修复。

Version 1.20.0

27 Sep 14:18
Compare
Choose a tag to compare

Breaking Change to request param

Before:

GET /dir?download shows simple page.

GET /dir?downloadfile shows simple page, and add download param to files.

GET /file?download download a file instead of displaying its content.

GET /file?downloadfile download a file instead of displaying its content.

After:

GET /dir?simple shows simple page.

GET /dir?download add download param to files.

GET /dir?simpledownload shows simple page, and add download param to files.

GET /file?download download a file instead of displaying its content.

Version 1.19.1

14 Aug 12:45
Compare
Choose a tag to compare

Minor improvements and fixes.


次要改进和修复。

Version 1.19.0

07 Aug 16:41
Compare
Choose a tag to compare

Main changes

  • reload TLS certificate files when received signal SIGHUP, useful when certificate renewed
  • focus child item when goes to parent directory
  • fix: skip outputting gzip-compressed content if it is a Range request
  • add request host to access log
  • minor fixes and improvements

Breaking change

API: request JSON data by header Accept: application/json

Usage for requesting JSON response changed.

Before:

curl 'http://server/path?json'

After:

curl -H 'Accept: application/json' 'http://server/path'

主要变更

  • 当收到信号SIGHUP时,重新加载TLS证书文件,在证书续期时很有用
  • 进入父目录时设置子项焦点
  • 修复:如果是Range请求,输出时跳过gzip压缩
  • 将请求主机添加到访问日志
  • 次要修复和改进

破坏性变更

API: 通过头Accept: application/json标识请求JSON数据

请求JSON响应的用法已发生变化。

之前:

curl 'http://server/path?json'

之后:

curl -H 'Accept: application/json' 'http://server/path'

Version 1.18.1

31 May 13:25
Compare
Choose a tag to compare
  • show logged in username
  • added --archive-user and --archive-dir-user

Version 1.18.0

12 May 10:18
Compare
Choose a tag to compare

Main changes

Added several options to control if directory index is available:

--index <url-path> ...
--index-user <separator><url-path>[<separator><allowed-username>...] ...
    Set url paths(and sub paths) that allows to index files of a directory.
    --index defaults to "/".
    Set to "" to disable index.
--index-dir <fs-path> ...
--index-dir-user <separator><fs-path>[<separator><allowed-username>...] ...
    Similar to --index, but use file system path instead of url path.

主要变更

添加了数个选项来控制目录列表的可见性:

--index <URL路径> ...
--index-user <分隔符><URL路径>[<分隔符><允许的用户名>...] ...
    设置允许索引目录的URL路径(及子路径)。
    --index默认值为"/"。
    设为""来禁用索引。
--index-dir <文件系统路径> ...
--index-dir-user <分隔符><文件系统路径>[<分隔符><允许的用户名>...] ...
    与--index类似,但指定的是文件系统路径,而不是URL路径。

Version 1.17.0

06 Mar 13:41
Compare
Choose a tag to compare

Main Changes

Authorize path access for specified users

added --auth-user and --auth-dir-user to restrict path access authentication to specified user.

  • --auth-user <separator><url-path>[<separator><allowed-username>...] ...
  • --auth-dir-user <separator><fs-path>[<separator><allowed-username>...] ...

example:

ghfs -r /usr --user user1:pass1 user2:pass2 user3:pass3 --auth-user :/share:user1 --auth-user :/bin:user2:user3

Grant mutate permission to specified user

It's nature that for a specified directory, administrator may have upload/mkdir/delete permissions, while other users or guests are read only.
Added several options to enable mutation for specified user:

  • --upload-user <separator><url-path>[<separator><allowed-username>...] ...
  • --upload-dir-user <separator><fs-path>[<separator><allowed-username>...] ...
  • --mkdir-user <separator><url-path>[<separator><allowed-username>...] ...
  • --mkdir-dir-user <separator><fs-path>[<separator><allowed-username>...] ...
  • -delete-user <separator><url-path>[<separator><allowed-username>...] ...
  • --delete-dir-user <separator><fs-path>[<separator><allowed-username>...] ...

example:

ghfs -r /data --user admin:adminpass --upload-user :/:admin --mkdir-user :/:admin --delete-user :/:admin

主要变更

授权特定用户访问目录

添加了--auth-user--auth-dir-user用于限定访问认证的用户。

  • --auth-user <分隔符><URL路径>[<分隔符><允许的用户名>...] ...
  • --auth-dir-user <分隔符><文件系统路径>[<分隔符><允许的用户名>...] ...

举例:

ghfs -r /usr --user user1:pass1 user2:pass2 user3:pass3 --auth-user :/share:user1 --auth-user :/bin:user2:user3

为指定用户授予变更权限

有个很常见的需求是对于某个目录,管理员有上传、建目录、删除权限,而普通用户或访客只有只读权限。
添加了多个选项来启用指定用户的更改权限:

  • --upload-user <分隔符><URL路径>[<分隔符><允许的用户名>...] ...
  • --upload-dir-user <分隔符><文件系统路径>[<分隔符><允许的用户名>...] ...
  • --mkdir-user <分隔符><URL路径>[<分隔符><允许的用户名>...] ...
  • --mkdir-dir-user <分隔符><文件系统路径>[<分隔符><允许的用户名>...] ...
  • --delete-user <分隔符><URL路径>[<分隔符><允许的用户名>...] ...
  • --delete-dir-user <分隔符><文件系统路径>[<分隔符><允许的用户名>...] ...

举例:

ghfs -r /data --user admin:adminpass --upload-user :/:admin --mkdir-user :/:admin --delete-user :/:admin

Version 1.16.0

30 Jan 13:56
Compare
Choose a tag to compare

Main changes

  • add env var GHFS_CPU_PROFILE_FILE to profile CPU usage
  • minor improvements and fixes

Breaking changes

replace --force-dir-slash with --auto-dir-slash

Before:

Option name is --force-dir-slash.

If a directory list page is requested without tailing "/" in the URL,
redirect to the URL with the suffix.

After:

Option name is --auto-dir-slash.

If a directory list page is requested without tailing "/" in the URL,
redirect to the URL with the suffix.

If a file is requested with tailing "/" in the URL,
redirect to the URL without the suffix.

remove support for case-sensitive username

Username is always case-insensitive now. --user-match-case is removed.
So case-sensitive username is no more supported.


主要变更

  • 添加环境变量GHFS_CPU_PROFILE_FILE来记录CPU使用日志
  • 次要改进和修复

破坏性变更

--force-dir-slash替换为--auto-dir-slash

之前:

选项名称为--force-dir-slash

如果在请求目录列表页时URL没有以“/”结尾,重定向到带有该结尾的URL。

之后:

选项名称为--auto-dir-slash

如果在请求目录列表页时URL没有以“/”结尾,重定向到带有该结尾的URL。

如果在请求文件时URL以“/”结尾,重定向到不带有该结尾的URL。

不再支持区分大小写的用户名

现在,用户名总是不区分大小写。--user-match-case现已移除。
因此不再支持大小写敏感的用户名。

Version 1.15.16

05 Jan 15:44
Compare
Choose a tag to compare

Security fixes

Skip unauthorized sub directories for archiving.

Other changes

Minor improvements and fixes.


安全性修复

打包时跳过未授权访问的子目录。

其它变更

次要改进和修复。

Version 1.15.15

06 Oct 06:20
Compare
Choose a tag to compare
  • apply CORS headers before custom headers, so later one can overrides
  • fix: add "execute" mode to directory in TAR archive
  • include response status code to access log
  • minor improvements and fixes.