Skip to content

Commit a0a4fa3

Browse files
committed
Hopefully fixes redirect
1 parent ed4c778 commit a0a4fa3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

www/osmapi.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?php
22
function oauth_make() {
3+
$redirect = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
34
return new \JBelien\OAuth2\Client\Provider\OpenStreetMap([
45
'clientId' => CLIENT_ID,
56
'clientSecret' => CLIENT_SECRET,
6-
'redirectUri' => 'http://127.0.0.1/level0/index.php?action=callback',
7+
'redirectUri' => $redirect.'?action=callback',
78
'dev' => strpos(OSM_API_URL, 'dev.openstreetmap') !== false
89
]);
910
}

0 commit comments

Comments
 (0)