Compare commits
No commits in common. "4fe4d662b789b87ac4bc9334d7561ac3b5632c9d" and "49af8f7d943fed36449eb67e549da91af9d3d020" have entirely different histories.
4fe4d662b7
...
49af8f7d94
|
@ -3,7 +3,3 @@ RewriteRule ^assets - [L]
|
||||||
RewriteRule ^.well-known - [L]
|
RewriteRule ^.well-known - [L]
|
||||||
RewriteRule ^data/public/ - [L]
|
RewriteRule ^data/public/ - [L]
|
||||||
RewriteRule . index.php
|
RewriteRule . index.php
|
||||||
|
|
||||||
<IfModule headers_module>
|
|
||||||
Header always set Content-Security-Policy "upgrade-insecure-requests;"
|
|
||||||
</ifModule>
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,27 +5,19 @@
|
||||||
* Define Descartes env
|
* Define Descartes env
|
||||||
*/
|
*/
|
||||||
$http_dir_path = '/raspisms'; //Path we need to put after servername in url to access app
|
$http_dir_path = '/raspisms'; //Path we need to put after servername in url to access app
|
||||||
$https = $_SERVER['HTTPS'] ?? 0;
|
$http_protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://';
|
||||||
|
$http_server_name = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost';
|
||||||
|
$http_server_port = isset($_SERVER['SERVER_PORT']) ? ($_SERVER['SERVER_PORT'] == 80) ? '' : ':' . $_SERVER['SERVER_PORT'] : '';
|
||||||
|
$https = $_SERVER['HTTPS'] ?? false;
|
||||||
|
|
||||||
// Check for proxy forward
|
if ( !isset($_SERVER['SERVER_PORT']) || ($_SERVER['SERVER_PORT'] == 80 && !$https) || ($_SERVER['SERVER_PORT'] == 443 && $https) )
|
||||||
$forwarded_https = ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? $_SERVER['HTTP_FORWARDED_PROTO'] ?? NULL) == 'https';
|
|
||||||
$forwarded_ssl = ($_SERVER['HTTP_X_FORWARDED_SSL'] ?? NULL) == 'on';
|
|
||||||
$proxy = $forwarded_https || $forwarded_ssl;
|
|
||||||
|
|
||||||
$http_protocol = 'http://';
|
|
||||||
if ($https)
|
|
||||||
{
|
{
|
||||||
$http_protocol = 'https://';
|
$http_server_port = '';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$http_server_port = ':' . $_SERVER['SERVER_PORT'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$http_server_name = $_SERVER['SERVER_NAME'] ?? 'localhost';
|
|
||||||
|
|
||||||
// Check port to only set it if not default port
|
|
||||||
$port = $_SERVER['SERVER_PORT'] ?? '';
|
|
||||||
$port = ($port == 80 && !$https) ? '' : $port;
|
|
||||||
$port = ($port == 443 && $https) ? '' : $port;
|
|
||||||
$port = $proxy ? '' : $port;
|
|
||||||
$http_server_port = $port ? ':' . $port : '';
|
|
||||||
|
|
||||||
|
|
||||||
$pwd = substr(__DIR__, 0, strrpos(__DIR__, '/'));
|
$pwd = substr(__DIR__, 0, strrpos(__DIR__, '/'));
|
||||||
|
|
Loading…
Reference in New Issue