Open Petrucheqa opened 6 years ago
Hello, I'm stuck with mixed content error. I'm on cloud hosting running https, but swagger try to load assets in HTTP.
Here is my swagger configuration
` use Cake\Core\Configure; return [ 'Swagger' => [ 'ui' => [ 'title' => 'PBE API Documentation', 'validator' => true, 'api_selector' => true, 'route' => 'api/swagger/', 'schemes' => ['https'] ], 'docs' => [ 'crawl' => Configure::read('debug'), 'route' => '/swagger/docs/', 'cors' => [ 'Access-Control-Allow-Origin' => '*', 'Access-Control-Allow-Methods' => 'GET, POST', 'Access-Control-Allow-Headers' => 'X-Requested-With' ] ], 'library' => [ 'api' => [ 'include' => ROOT . DS . 'src' . DS . 'Controller' . DS . 'Api', 'exclude' => [ '/Editor/' ] ] ] ] ];
`
Locally it works but not in production.
I don't understand.
Thank you, for your time
Do you have https in your swagger doc scheme aswell?
**
Hello, I'm stuck with mixed content error. I'm on cloud hosting running https, but swagger try to load assets in HTTP.
Here is my swagger configuration
` use Cake\Core\Configure; return [ 'Swagger' => [ 'ui' => [ 'title' => 'PBE API Documentation', 'validator' => true, 'api_selector' => true, 'route' => 'api/swagger/', 'schemes' => ['https'] ], 'docs' => [ 'crawl' => Configure::read('debug'), 'route' => '/swagger/docs/', 'cors' => [ 'Access-Control-Allow-Origin' => '*', 'Access-Control-Allow-Methods' => 'GET, POST', 'Access-Control-Allow-Headers' => 'X-Requested-With' ] ], 'library' => [ 'api' => [ 'include' => ROOT . DS . 'src' . DS . 'Controller' . DS . 'Api', 'exclude' => [ '/Editor/' ] ] ] ] ];
`
Locally it works but not in production.
I don't understand.
Thank you, for your time