mirror of
https://github.com/opensolutions/ViMbAdmin.git
synced 2026-04-26 00:36:00 +03:00
[GH-ISSUE #19] nginx + ViMbAdmin #16
Labels
No labels
bug
feature
feature
improvement
improvement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ViMbAdmin-opensolutions#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @f8bar on GitHub (Jun 5, 2012).
Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/19
Originally assigned to: @barryo on GitHub.
It's actually not a bug but if you're using NGINX with the standard configuration and HTTPS is not active on your vhost
Nginx fills the $_SERVER['HTTPS'] with an empty String thanks to the preconfigured fastcgi_params.
The result is that the genUrl will allways start with https://...:
$vView->pagebase = 'http' . ( isset( $_SERVER['HTTPS'] ) ? 's' : '' ) . '://'
in library/ViMbAdmin/Controller/Action.php on line: 342.
A much more accurate way to check if HTTPS is active would be:
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) {
or
if($_SERVER['SERVER_PORT'] == '443')
@barryo commented on GitHub (Jun 14, 2012):
Thanks @f8bar - this is now in the dev branch and will be included in the next release.
@f8bar commented on GitHub (Sep 5, 2012):
Your commit throw a syntax error...
Please use this line for 343:
. (((isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS'])) && $_SERVER['HTTPS'] !== 'off' ) || ( isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443 ) ) ? 's' : ''