Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#31439 closed enhancement (duplicate)

is_ssl not compatible with server - option for filter or hook

Reported by: mralexanderca's profile MrAlexander.Ca Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1.1
Component: General Keywords:
Focuses: Cc:

Description

Hello,

I have been developing with wordpress for over 7 years and its great, have customized it a lot and achieved great results with it.

I came across an interesting situation where the server is actually proxying another server and when visiting the https:// version the "default" $_SERVERHTTPS? = 'on' or $_SERVERSERVER_PORT? = 443 does not get set but instead the following takes place:

$_SERVER[HTTP_X_FORWARDED_PROTO] = 'https';

So even when the URL is https:// the function is_ssl() is not functioning properly as its not one of the conditions to detect.

A solution would be to provide a hook to the is_ssl function and let these rare and special cases be handled when necessary or incorporate the above condition as well.

Thank you very much for looking into this, I will be glad to address any questions.

Change History (2)

#1 @ocean90
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #31288 and #15733.

#2 @johnbillion
10 years ago

To add a little more context, this has been discussed quite a few times in the past (https://core.trac.wordpress.org/search?q=is_ssl%20proxy&ticket=on) and the general consensus has always been that it's up to the server owner to set the appropriate $_SERVER variables in their wp-config.php file

However there is some current discussion on #31288 on whether we should change this.

Note: See TracTickets for help on using tickets.