diff --git a/config.ru b/config.ru
index 106f834e..f9b8adce 100644
--- a/config.ru
+++ b/config.ru
@@ -24,6 +24,24 @@ map '/webdav' do
request_method = env['REQUEST_METHOD']
path = env['PATH_INFO']
+ unless @site.owner.supporter?
+ return [
+ 402,
+ {
+ 'Content-Type' => 'application/xml',
+ 'X-Upgrade-Required' => 'https://neocities.org/supporter'
+ },
+ [
+ <<~XML
+
+
- Neocities supports WebDAV, which allows you to mount your Neocities share on your computer. + Neocities supports WebDAV, which allows you to mount your Neocities share on your computer, or use a client on your computer to manage your site.
- <% if current_site.nil? %> + <% if current_site.nil? || !current_site.supporter? %>- This feature requires a supporter account. -
- <% elsif !current_site.supporter? %> -- This feature requires a supporter account. Click here to become a supporter. + This feature requires a supporter account.
<% else %> -- Unfortunately, the WebDAV that comes with Windows file manager has issues with SSL, - and the problem has not yet been fixed. We recommend using a client like Cyberduck or WinSCP with Windows, which is free and has - WebDAV support. You can also try Mountain Duck - which will allow you to mount your Neocities site as a hard drive on your computer. + Due to the variable quality of other WebDAV clients, we strongly recommend using Cyberduck or WinSCP for a WebDAV client, or Mountain Duck for mounting the site as a hard drive on your computer, and may not be able to provide support for other clients.
-
- Use these instructions, and use this URL to connect: https://neocities.org/webdav
+ In Cyberduck, click "Open Connection", select "WebDAV (HTTPS), add neocities.org, username, and password. Then click "More Options", and add /webdav
for the path.
- Enter login info when requested.
+
- You can also try out Cyberduck or Mountain Duck if you run into any issues.
+ When creating a connetion, choose "WebDAV" for protocol, select "SSL" for encryption, then enter neocities.org for server name, port 443, username and password. Before connecting, click "Advanced", select "Directories" and add /webdav
to the Remote directory input.
+
+
cadaver is an excellent command line client for WebDAV and is available through apt with Ubuntu. +
@@ -65,13 +61,8 @@
- By default you can use your username/password combination to access your parent site via WebDAV (This is <%= current_site.parent? ? current_site.username : current_site.parent.username %>
). In case you want to access any other sites you only need to use the site's subdomain name as the username (with the same password for your account).
+ By default you can use your username/password combination to access your parent site via WebDAV. In case you want to access your child sites with WebDAV, you only need to use the site's subdomain name as the username (with the same password for your parent account).
- You can see a list of your sites in your settings page. -
- <% end %>