Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Https loading assets [QUESTION] #43

Open
Petrucheqa opened this issue Jun 14, 2018 · 1 comment
Open

Https loading assets [QUESTION] #43

Petrucheqa opened this issue Jun 14, 2018 · 1 comment

Comments

@Petrucheqa
Copy link

Petrucheqa commented Jun 14, 2018

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

@frogjimjaff
Copy link

Do you have https in your swagger doc scheme aswell?

**

  • @swg\Swagger(
  • schemes={"https"},
    
  • host="/api/v1/",
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants