Skip to content

Nginx (Reverse) Proxy with url-based targets to universally strip specific response headers like X-Frame-Options

Notifications You must be signed in to change notification settings

Miroka96/url-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

url-proxy

Testing

manual

docker build -t miroka96/url-proxy . && docker run --rm -p 8080:80 miroka96/url-proxy

After that, perform manual testing in a webbrowser: http://localhost:8080/[url]

Issues

  • removal of base href leaves a slightly broken html (this is necessary to invalidate this statement, because otherwise a regex would be needed for replacement, which is not supportet by nginx sub_filter, but maybe by other substitution plugins)
  • some replacements have unwanted side effects, which make it impossible to use google.com or yahoo.com, because some substrings in javascript code match the same patterns as relative URLs and so get replaced too... this breaks further loading of dependencies. It could be fixed by manually specifying all prefixed of relative URLs that should be substituted, but this is hard work

Warning

  • do not generalize te available protocols (http and https) to prevent file inclusion exploits through file:// protocol (untested, but seems logical) - open for comments

About

Nginx (Reverse) Proxy with url-based targets to universally strip specific response headers like X-Frame-Options

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published