Skip to content

Commit

Permalink
fix: api uri
Browse files Browse the repository at this point in the history
  • Loading branch information
injahow committed Aug 6, 2021
1 parent 7a4eaf9 commit c58c42a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,7 @@

function api_uri() // static
{
if (isset($_SERVER['HTTPS'])) {
return 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
} else {
return 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}
return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . strtok($_SERVER['REQUEST_URI'], '?');
}

function auth($name)
Expand Down

0 comments on commit c58c42a

Please sign in to comment.