File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -260,19 +260,14 @@ public static function getSelfURLhost()
260260 $ protocol = 'http ' ;
261261 }
262262
263- if (isset ($ _SERVER ["SERVER_PORT " ])) {
263+ if (isset ($ _SERVER ["X-Forwarded-Port " ])) {
264+ $ portnumber = $ _SERVER ["X-Forwarded-Port " ];
265+ } else if (isset ($ _SERVER ["SERVER_PORT " ])) {
264266 $ portnumber = $ _SERVER ["SERVER_PORT " ];
265- $ port = ' : ' . $ portnumber ;
267+ }
266268
267- if ($ protocol == 'http ' ) {
268- if ($ portnumber == '80 ' ) {
269- $ port = '' ;
270- }
271- } elseif ($ protocol == 'https ' ) {
272- if ($ portnumber == '443 ' ) {
273- $ port = '' ;
274- }
275- }
269+ if (isset ($ portnumber ) && ($ portnumber != '80 ' ) && ($ portnumber != '443 ' )) {
270+ $ port = ': ' . $ portnumber ;
276271 }
277272
278273 return $ protocol .":// " . $ currenthost . $ port ;
You can’t perform that action at this time.
0 commit comments