Skip to content

Instantly share code, notes, and snippets.

@mathroc
Last active August 29, 2015 14:23
Show Gist options
  • Save mathroc/5b2bb374854878511d9a to your computer and use it in GitHub Desktop.
Save mathroc/5b2bb374854878511d9a to your computer and use it in GitHub Desktop.
proxy:
image: jwilder/nginx-proxy
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- 5498:80
backend:
image: php:5.6-apache
environment:
VIRTUAL_HOST: test-jwilder-nginx-proxy.127.0.0.1.xip.io
volumes:
- index.php:/var/www/html/index.php:ro
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE');
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Headers: Origin,Content-Type,Accept') ;
var_dump($_SERVER['REQUEST_METHOD']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment