Coder Social home page Coder Social logo

review-o-matic-explore's Introduction

Side-by-side Browser

Simple node.js proxy to serve a side-by-side browser and a site being reviewed under on the same domain, so the side-by-side browser is 'live' and not blocked by Same-Origin-Policy.

$ node server.js

Run the tests

$ npm install
$ npm test

Setup Nginx to supply headers

The proxy can be used to serve, subject to headers, For example to proxy www.direct.gov.uk on explore-dg.dev.gov.uk:

upstream explore-dg.dev.gov.uk-proxy {
    server localhost:3023;
}

server {
  server_name explore-dg.dev.co.uk ;

  listen 80;

  proxy_set_header Host $http_host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-Server $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_redirect off;

  access_log /var/log/nginx/explore-dg.dev.co.uk-access.log timed_combined;
  error_log /var/log/nginx/explore-dg.dev.co.uk-error.log;

  location / {
    proxy_pass http://explore-dg.dev.co.uk-proxy;
  }

  # headers to proxy DirectGov
  proxy_set_header X-Explore-Title DirectGov;
  proxy_set_header X-Explore-Upstream www.direct.gov.uk;
  proxy_set_header X-Explore-Redirector redirector.dev.gov.uk;
}

review-o-matic-explore's People

Contributors

annashipman avatar i0n avatar nickstenning avatar psd avatar rujmah avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.