Skip to content

Commit

Permalink
Fix Swagger Doc page API Protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
waifung0207 committed Mar 10, 2017
1 parent 6b0dcba commit 0b0044d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions application/config/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
define('BASE_URL', $base_url);

// For API prefix in Swagger annotation (/application/modules/api/swagger/info.php)
define('API_PROTOCOL', $protocol);
define('API_HOST', $_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
}

Expand Down
2 changes: 1 addition & 1 deletion application/modules/api/swagger/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* email="[email protected]"
* )
* ),
* schemes={"http"},
* schemes={API_PROTOCOL},
* host=API_HOST,
* basePath="/api"
* )
Expand Down

0 comments on commit 0b0044d

Please sign in to comment.