Skip to content

Commit

Permalink
Hopefully fixes redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Zverik committed Jun 23, 2024
1 parent ed4c778 commit a0a4fa3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/osmapi.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php
function oauth_make() {
$redirect = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
return new \JBelien\OAuth2\Client\Provider\OpenStreetMap([
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => 'http://127.0.0.1/level0/index.php?action=callback',
'redirectUri' => $redirect.'?action=callback',
'dev' => strpos(OSM_API_URL, 'dev.openstreetmap') !== false
]);
}
Expand Down

0 comments on commit a0a4fa3

Please sign in to comment.