fix: secure unpkg url's

This commit is contained in:
b1ek 2024-08-20 17:03:06 +10:00
parent c98ab0988d
commit 6f246afc8f
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 2 additions and 2 deletions

View File

@ -3,8 +3,8 @@
/** @var yii\web\View $this */ /** @var yii\web\View $this */
$this->title = 'OpenAPI spec'; $this->title = 'OpenAPI spec';
$this->registerJsFile('//unpkg.com/swagger-ui-dist/swagger-ui-bundle.js'); $this->registerJsFile('//unpkg.com/swagger-ui-dist@5.17.14/swagger-ui-bundle.js', [ 'crossorigin' => 'anonymous', 'integrity' => 'sha384-wmyclcVGX/WhUkdkATwhaK1X1JtiNrr2EoYJ+diV3vj4v6OC5yCeSu+yW13SYJep' ]);
$this->registerCssFile('//unpkg.com/swagger-ui-dist/swagger-ui.css'); $this->registerCssFile('//unpkg.com/swagger-ui-dist@5.17.14/swagger-ui.css', [ 'crossorigin' => 'anonymous', 'integrity' => 'sha384-wxLW6kwyHktdDGr6Pv1zgm/VGJh99lfUbzSn6HNHBENZlCN7W602k9VkGdxuFvPn' ]);
$loader = <<< JS $loader = <<< JS
const ui = SwaggerUIBundle({ const ui = SwaggerUIBundle({