• Stars
    star
    3,091
  • Rank 14,551 (Top 0.3 %)
  • Language
    Go
  • License
    MIT License
  • Created over 7 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple and standalone WebDAV server.

⚠️ Disclaimer: this repository is not actively maintained. If you are interested in maintaining it, please contact me.

webdav

Build Go Report Card Version Docker Pulls

Install

Please refer to the Releases page for more information. There, you can either download the binaries or find the Docker commands to install WebDAV.

Usage

webdav command line interface is really easy to use so you can easily create a WebDAV server for your own user. By default, it runs on a random free port and supports JSON, YAML and TOML configuration. An example of a YAML configuration with the default configurations:

# Server related settings
address: 0.0.0.0
port: 0
auth: true
tls: false
cert: cert.pem
key: key.pem
prefix: /
debug: false

# Default user settings (will be merged)
scope: .
modify: true
rules: []

# CORS configuration
cors:
  enabled: true
  credentials: true
  allowed_headers:
    - Depth
  allowed_hosts:
    - http://localhost:8080
  allowed_methods:
    - GET
  exposed_headers:
    - Content-Length
    - Content-Range

users:
  - username: admin
    password: admin
    scope: /a/different/path
  - username: encrypted
    password: "{bcrypt}$2y$10$zEP6oofmXFeHaeMfBNLnP.DO8m.H.Mwhd24/TOX2MWLxAExXi4qgi"
  - username: "{env}ENV_USERNAME"
    password: "{env}ENV_PASSWORD"
  - username: basic
    password: basic
    modify:   false
    rules:
      - regex: false
        allow: false
        path: /some/file
      - path: /public/access/
        modify: true

There are more ways to customize how you run WebDAV through flags and environment variables. Please run webdav --help for more information on that.

Systemd

An example of how to use this with systemd is on webdav.service.example.

CORS

The allowed_* properties are optional, the default value for each of them will be *. exposed_headers is optional as well, but is not set if not defined. Setting credentials to true will allow you to:

  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

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

More Repositories

1

caddy-v1-service

⬛ Run Caddy as a service
Go
69
star
2

caddy-v1-webdav

📂 WebDAV support for Caddy server.
Go
41
star
3

caddy-v1-minify

📄 Caddy plugin that provides file minification
Go
40
star
4

blocklearning

Blockchain-based federated learning modular framework.
Python
39
star
5

electron-menubar

Easy way to create an electron menubar application.
JavaScript
38
star
6

indielib

An IndieWeb toolkit in Go.
Go
36
star
7

eagle

🔌 My website's blogging platform.
Go
24
star
8

fileutils

Golang file system utils such as copy files and directories
Go
19
star
9

zipcodes-regex

A list of regular expressions for zipcodes
12
star
10

mapgen

Pseudo-random map generator through OpenSimplex noise algorithm
Go
11
star
11

hacdias.com

🧙‍♂️ Source of my website.
HTML
10
star
12

xkcd-archiver

A cloner of the XKCD comics for archiving purposes.
Go
10
star
13

journal

📔 A command line journal tool with web interface
Go
10
star
14

eagle-js

🔌 API that powers my website.
JavaScript
6
star
15

maze

Reverse location information.
Go
5
star
16

clown-bot-discord

Discord bot to tell jokes and show XKCD comics.
JavaScript
5
star
17

ownyourtrakt

Own your trakt records!
Go
5
star
18

notes.hacdias.com

🍃 The source code of my garden.
HTML
4
star
19

fingerd

Go finger daemon.
Go
4
star
20

kubo-rpc-client-generator

Go
3
star
21

js-indieauth-middleware

A simple IndieAuth middleware that can be used with Express.js
JavaScript
3
star
22

silos-collector

💻 Data collectors from some silos.
JavaScript
3
star
23

fintracts

Financial Contracts
Go
3
star
24

flowfit

Convert Bosch's eBike Flow FIT file into a FIT file that can be imported by other tools.
Swift
3
star
25

caddy-docker

Custom docker image for Caddy
Dockerfile
2
star
26

js-micropub-parser

A micropub body parser.
JavaScript
2
star
27

nata.cafe

☕️ The source of nata.cafe
HTML
2
star
28

dht-testground

JavaScript
2
star
29

lshash

List your files and print their [md5/sha1/sha256/sha512] hash
Go
2
star
30

notes-to-hugo

📓 Converts my Notes to a Hugo friendly format.
Go
2
star
31

advent-of-code

🎄 Advent of Code
Go
2
star
32

hacdias

✨ My special repository.
2
star
33

thesis

TeX
2
star
34

dotfiles

⚡️ Dotfiles, scripts and configurations.
Go
2
star
35

clown-bot-telegram

Telegram bot to tell jokes and show XKCD comics.
JavaScript
2
star
36

playground

For all the experiments that do not deserve their own repository.
PHP
1
star
37

aprenda-a-programar

Old ebook in digital format.
HTML
1
star
38

caddy-v1-plugin-test

🐬 Docker image to test the build of Caddy plugins.
Shell
1
star
39

is-valid-zipcode

Check if a zip/postal code is valid
JavaScript
1
star
40

mathspot

[EXPERIMENT]
PHP
1
star
41

fake-bsod

Harmless fake BSOD for Windows
C++
1
star
42

vscode-notes

Note-taking helper extension for VSCode
TypeScript
1
star
43

hugo-caddy-redirs

Caddy redirects generation for Hugo websites
1
star
44

secure-notes

Create secure notes
PHP
1
star