CORS, trusted domain

This commit is contained in:
2024-04-11 11:51:50 -04:00
parent a238ad3b7f
commit 3851b7f289
12 changed files with 80 additions and 14 deletions

View File

@@ -13,9 +13,12 @@ class Swagger extends Request {
$this->csrfTokenRequired = false;
}
protected function getCORS(): array {
return ["*"];
}
public function _execute(): bool {
header("Content-Type: application/x-yaml");
header("Access-Control-Allow-Origin: *");
die($this->getDocumentation());
}