Skip to content

Commit

Permalink
feat: add source request log (#71)
Browse files Browse the repository at this point in the history
Co-authored-by: shenyuning <[email protected]>
Co-authored-by: sxueck <[email protected]>
  • Loading branch information
3 people authored Jul 1, 2021
1 parent 099479a commit 9a4b378
Show file tree
Hide file tree
Showing 6 changed files with 310 additions and 62 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ The `allowed_*` properties are optional, the default value for each of them will
1. Use `withCredentials = true` in javascript.
2. Use the `username:password@host` syntax.

### Reverse Proxy Service
When you use a reverse proxy implementation like `Nginx` or `Apache`, please note the following fields to avoid causing `502` errors
```text
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
}
```

## License

MIT © [Henrique Dias](https://hacdias.com)
23 changes: 13 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
module github.com/hacdias/webdav/v3

go 1.12
go 1.16

require (
github.com/pelletier/go-toml v1.6.0 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cobra v0.0.5
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/pelletier/go-toml v1.9.3 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.1.3
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.5.0
golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a
golang.org/x/net v0.0.0-20191109021931-daa7c04131f5
golang.org/x/sys v0.0.0-20191105231009-c1f44814a5cd // indirect
golang.org/x/text v0.3.2 // indirect
gopkg.in/yaml.v2 v2.2.5 // indirect
github.com/spf13/viper v1.7.1
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
golang.org/x/net v0.0.0-20210614182718-04defd469f4e
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
)
Loading

3 comments on commit 9a4b378

@afedorov3
Copy link

Choose a reason for hiding this comment

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

Why PUT, LOCK, UNLOCK, MOVE and DELETE is considered as no modifying? modify flag is not working as it was in 4.0.0 and earlier.

@mohammed90
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why PUT, LOCK, UNLOCK, MOVE and DELETE is considered as no modifying? modify flag is not working as it was in 4.0.0 and earlier.

I suspected this was as such and put a note in my local copy, but never got around to validate and test it. This link is in my notes:
https://www.ibm.com/docs/en/i/7.3?topic=concepts-webdav

If you can validate the reasoning, can you submit a PR?

@afedorov3
Copy link

Choose a reason for hiding this comment

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

I suppose the modify flag in config.yml is allowing R/W acces to the given URL for the current user, as it presented in the example config in the README.md.
The User.Allowed function in lib/user.go operates in a context of URL/user and flags Allow (any access) and Modify (write access). Please corect me if I'm wrong on that.

Please sign in to comment.