In order to access a server hosted within a vm, for development purposes, which is restricted to same origin / localhost only requests, I set up a siple nginx reverse proxy to forward my requests.
- To install in a Windows VM, download and install nginx from the current, stable release; I installed to C:\nginx\
- Executing the nginx.exe in your install path will start the nginx server with default configuration, edit the conf/nginx.conf file with the marked changes in the file of the same name in this gist.
The config file contains a server {} block, inside which is a location / {} block. Inside that location block, we need to comment out the root and index assignment and add in a proxy_pass http://127.0.0.1:8080; line and a proxy_http_version 1.1; line.