Skip to content

Commit

Permalink
Don't need docker server IP in here anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
diginc committed Jul 8, 2016
1 parent d1ef51a commit 246599a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions php/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ function log_and_die($message) {
if (! empty($virtual_host))
array_push($AUTHORIZED_HOSTNAMES, 'http://' . $virtual_host);

# For docker container's host IP, SERVER_ADDR will be docker0 interface ip
$server_ip = getenv('ServerIP');
if (! empty($server_ip))
array_push($AUTHORIZED_HOSTNAMES, 'http://' . $server_ip);

// Check CORS
if(isset($_SERVER['HTTP_ORIGIN'])) {
if(in_array($_SERVER['HTTP_ORIGIN'], $AUTHORIZED_HOSTNAMES)) {
Expand Down

0 comments on commit 246599a

Please sign in to comment.