Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
c0213959
Commit
c0213959
authored
6 years ago
by
pupi1985
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to guess the appropriate protocol when generating the site URL
parent
40f15d44
dev
…
3113-openbar-authentification
3241-delete-all-the-question
3242-password-removed
3414-no-change-mail
3414-stop-mail-send
main
v1.8.6
v1.8.5
v1.8.4
v1.8.3
v1.8.2
v1.8.1
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
options.php
qa-include/app/options.php
+7
-1
No files found.
qa-include/app/options.php
View file @
c0213959
...
...
@@ -398,7 +398,13 @@ function qa_default_option($name)
switch
(
$name
)
{
case
'site_url'
:
$value
=
'http://'
.
@
$_SERVER
[
'HTTP_HOST'
]
.
strtr
(
rtrim
(
dirname
(
$_SERVER
[
'SCRIPT_NAME'
]),
'/'
),
'\\'
,
'/'
)
.
'/'
;
$protocol
=
(
!
empty
(
$_SERVER
[
'HTTPS'
])
&&
$_SERVER
[
'HTTPS'
]
!==
'off'
)
||
(
!
empty
(
$_SERVER
[
'HTTP_X_FORWARDED_SSL'
])
&&
$_SERVER
[
'HTTP_X_FORWARDED_SSL'
]
===
'on'
)
||
(
!
empty
(
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
])
&&
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
]
===
'https'
)
?
'https'
:
'http'
;
$value
=
$protocol
.
'://'
.
@
$_SERVER
[
'HTTP_HOST'
]
.
strtr
(
rtrim
(
dirname
(
$_SERVER
[
'SCRIPT_NAME'
]),
'/'
),
'\\'
,
'/'
)
.
'/'
;
break
;
case
'site_title'
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment