diff options
| author | reger <reger18@arcor.de> | 2014-03-30 04:04:02 +0200 |
|---|---|---|
| committer | reger <reger18@arcor.de> | 2014-03-30 04:04:02 +0200 |
| commit | b12200cafe77e03b5e209ca64013cb7fdc428122 (patch) | |
| tree | 0b81d0ba34ec1a1f5cc1f211aca540904e32b1c8 /defaults/web.xml | |
| parent | 7f29eee9acc17eb2e31180310088d10ce8fed7b1 (diff) | |
alternative UrlProxyServlet (for /proxy.html) using different url rewrite rules
- use JSoup parser for selective rewrite of html body <a href= links only,
instead of regex which rewrites also header href/src links
- this improves display of pages which use header <base> tag
- tags with src attribute are taken from original location (like css) improving display and are not routed trough the indexer
Disadvantage: scripting links will drop out of proxy
Setting of the servlet through web.xml exclusivly (in case one would like to quickly switch back to the YaCyProxyServlet,
leaving the existing code of YaCyProxyServlet untouched available)
Diffstat (limited to 'defaults/web.xml')
| -rw-r--r-- | defaults/web.xml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/defaults/web.xml b/defaults/web.xml index 68e84d995..6c8b409bb 100644 --- a/defaults/web.xml +++ b/defaults/web.xml @@ -42,7 +42,11 @@ <!-- servlet to provide searchresults via proxy and needed for Augmented Browsing --> <servlet> <servlet-name>URLProxyServlet</servlet-name> + <!-- replaced with alternative servlet with new url rewrite rules + you may replace the new with YaCyProxyServlet here, to switch back <servlet-class>net.yacy.http.servlets.YaCyProxyServlet</servlet-class> + --> + <servlet-class>net.yacy.http.servlets.UrlProxyServlet</servlet-class> </servlet> <!-- mappings activated by the application - hardcoded (added here for completness) --> @@ -61,6 +65,7 @@ <servlet-mapping> <servlet-name>URLProxyServlet</servlet-name> <url-pattern>/proxy.html</url-pattern> + <url-pattern>/proxy</url-pattern> </servlet-mapping> <servlet-mapping> |
