Skip to content
This repository was archived by the owner on Jan 3, 2019. It is now read-only.

Connexions/webview-prerender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Prerender service

Setup

npm install

Add the following into your nginx config (note the service runs on :4000):

  # Support page prerendering for web crawlers
  if ($args ~ "(.*)?&?_escaped_fragment_=(.*)") {
      set $args $1;
      set $cleanurl $uri$is_args$1;
      set $cleanservername $http_host;
      rewrite ^ /snapshot${cleanurl};
  }
  location /snapshot {
      proxy_set_header X-Rewrite-CleanHOST $cleanservername;
      proxy_set_header X-Rewrite-CleanURI $cleanurl;
      proxy_set_header X-Rewrite-URI $request_uri;
      proxy_pass http://localhost:4000;
      proxy_connect_timeout 60s;
  }

To start the service run node prerender

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •