mirror of
https://github.com/ambieco/scribe.git
synced 2026-04-26 18:54:55 +08:00
Resolves #543 For the HTTP scheme if baseUrl starts with https
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Mpociot\ApiDoc\Postman;
|
||||
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
|
||||
@@ -33,6 +34,9 @@ class CollectionWriter
|
||||
{
|
||||
try {
|
||||
URL::forceRootUrl($this->baseUrl);
|
||||
if (Str::startsWith($this->baseUrl, 'https://')) {
|
||||
URL::forceScheme('https');
|
||||
}
|
||||
} catch (\Error $e) {
|
||||
echo "Warning: Couldn't force base url as your version of Lumen doesn't have the forceRootUrl method.\n";
|
||||
echo "You should probably double check URLs in your generated Postman collection.\n";
|
||||
|
||||
Reference in New Issue
Block a user