Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
mapas
MapasBR - PA
Commits
90fb62e1
Commit
90fb62e1
authored
6 years ago
by
Rafael Chaves Freitas
Browse files
Options
Download
Email Patches
Plain Diff
usa HTTP_HOST como base do url na configuração da autenticação de produção
parent
f9b121c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
compose/production/config.d/authentication.php
compose/production/config.d/authentication.php
+9
-2
No files found.
compose/production/config.d/authentication.php
View file @
90fb62e1
<?php
// creating base url
$prot_part
=
isset
(
$_SERVER
[
'HTTPS'
])
&&
$_SERVER
[
'HTTPS'
]
?
'https://'
:
'http://'
;
//added @ for HTTP_HOST undefined in Tests
$host_part
=
@
$_SERVER
[
'HTTP_HOST'
]
.
dirname
(
$_SERVER
[
'SCRIPT_NAME'
]);
if
(
substr
(
$host_part
,
-
1
)
!==
'/'
)
$host_part
.
=
'/'
;
$_APP_BASE_URL
=
$prot_part
.
$host_part
;
return
[
'auth.provider'
=>
'\MultipleLocalAuth\Provider'
,
'auth.config'
=>
array
(
...
...
@@ -14,13 +21,13 @@ return [
'LinkedIn'
=>
array
(
'api_key'
=>
env
(
'AUTH_LINKEDIN_API_KEY'
,
null
),
'secret_key'
=>
env
(
'AUTH_LINKEDIN_SECRET_KEY'
,
null
),
'redirect_uri'
=>
APP_BASE_URL
.
'autenticacao/linkedin/oauth2callback'
,
'redirect_uri'
=>
$_
APP_BASE_URL
.
'autenticacao/linkedin/oauth2callback'
,
'scope'
=>
env
(
'AUTH_LINKEDIN_SCOPE'
,
'r_emailaddress'
)
),
'Google'
=>
array
(
'client_id'
=>
env
(
'AUTH_GOOGLE_CLIENT_ID'
,
null
),
'client_secret'
=>
env
(
'AUTH_GOOGLE_CLIENT_SECRET'
,
null
),
'redirect_uri'
=>
APP_BASE_URL
.
'autenticacao/google/oauth2callback'
,
'redirect_uri'
=>
$_
APP_BASE_URL
.
'autenticacao/google/oauth2callback'
,
'scope'
=>
env
(
'AUTH_GOOGLE_SCOPE'
,
'email'
),
),
'Twitter'
=>
array
(
...
...
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