Skip to content

fuweichin/servlet-reverse-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

servlet-reverse-proxy

servlet-reverse-proxy is a Java servlet to play a role of reverse-proxy.

Why servlet-reverse-proxy

Our front-end webapp uses canvas, we want to take screenshot from canvas, but some images on canvas come from another origin and calling canvas.toDataURL() will throw an error or gets a blank image. After some googling we found what it is about, see stackoverflow - is-canvas-security-model-ignoring... and whatwg - security-with-canvas-elements

Usage

use standard-alone war

  1. Edit pom.xml, set <packaging>war</packaging>
  2. Edit web.xml, register servlet ReverseProxyServlet.
  3. Package this project as "img_c.war" and deploy it.

use embedded jar

  1. Edit pom.xml, set <packaging>jar</packaging>
  2. Edit your own web.xml, register servlet ReverseProxyServlet. see web.xml in this project.

About

Simple web reverse proxy Servlet edition

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages