Skip to content

Commit

Permalink
[boostrap] Enabled the uri base path (#4064)
Browse files Browse the repository at this point in the history
* [update:execute] Fixed update table

* [boostrap] Enabled the uri base path
  • Loading branch information
hjuarez20 authored and enzolutions committed May 28, 2019
1 parent 047c18b commit 9685080
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Bootstrap/Drupal.php
Expand Up @@ -92,9 +92,20 @@ public function boot()
$io->writeln('➤ Creating request');
}

$parsed_url = parse_url($uri);

if($parsed_url['scheme'] == 'https') {
$_SERVER['HTTPS'] = 'on';
}

$path = '/';
if(isset($parsed_url['path'])) {
$path = $parsed_url['path'] . $path;
}

$_SERVER['HTTP_HOST'] = parse_url($uri, PHP_URL_HOST);
$_SERVER['SERVER_PORT'] = null;
$_SERVER['REQUEST_URI'] = '/';
$_SERVER['REQUEST_URI'] = $path;
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['SERVER_SOFTWARE'] = null;
Expand Down

0 comments on commit 9685080

Please sign in to comment.