Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
+ 支持用户名密码认证
Browse files Browse the repository at this point in the history
  • Loading branch information
eritpchy committed Sep 11, 2021
1 parent d5e410f commit 7c4723d
Showing 1 changed file with 47 additions and 33 deletions.
80 changes: 47 additions & 33 deletions src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,38 +1,52 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<servlet>
<servlet-name>WebdavServlet</servlet-name>
<servlet-class>net.sf.webdav.WebdavServlet</servlet-class>
<init-param>
<param-name>ResourceHandlerImplementation</param-name>
<param-value>com.github.zxbu.webdavteambition.store.AliYunDriverFileSystemStore</param-value>
</init-param>
<init-param>
<param-name>rootpath</param-name>
<param-value>./</param-value>
</init-param>
<init-param>
<param-name>storeDebug</param-name>
<param-value>1</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>WebdavServlet</servlet-name>
<servlet-class>net.sf.webdav.WebdavServlet</servlet-class>
<init-param>
<param-name>ResourceHandlerImplementation</param-name>
<param-value>com.github.zxbu.webdavteambition.store.AliYunDriverFileSystemStore
</param-value>
</init-param>
<init-param>
<param-name>rootpath</param-name>
<param-value>./</param-value>
</init-param>
<init-param>
<param-name>storeDebug</param-name>
<param-value>1</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>WebdavServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>ErrorFilter</filter-name>
<filter-class>com.github.zxbu.webdavteambition.filter.ErrorFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ErrorFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet-mapping>
<servlet-name>WebdavServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>ErrorFilter</filter-name>
<filter-class>com.github.zxbu.webdavteambition.filter.ErrorFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ErrorFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<security-constraint>
<web-resource-collection>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>

<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Console</realm-name>
</login-config>

</web-app>

0 comments on commit 7c4723d

Please sign in to comment.