This commit is contained in:
2021-09-09 17:05:18 +08:00
parent edf5fdb7fc
commit 8ddd368c65
2 changed files with 12 additions and 12 deletions
+6 -6
View File
@@ -99,30 +99,30 @@ class Response implements ResponseInterface, \Server\ResponseInterface
/** /**
* @param string $value * @param string|null $value
* @return Response * @return Response
*/ */
public function withAccessControlAllowHeaders(string $value): static public function withAccessControlAllowHeaders(?string $value): static
{ {
return $this->withHeader('Access-Control-Allow-Headers', $value); return $this->withHeader('Access-Control-Allow-Headers', $value);
} }
/** /**
* @param string $value * @param string|null $value
* @return Response * @return Response
*/ */
public function withAccessControlRequestMethod(string $value): static public function withAccessControlRequestMethod(?string $value): static
{ {
return $this->withHeader('Access-Control-Request-Method', $value); return $this->withHeader('Access-Control-Request-Method', $value);
} }
/** /**
* @param string $value * @param string|null $value
* @return Response * @return Response
*/ */
public function withAccessControlAllowOrigin(string $value): static public function withAccessControlAllowOrigin(?string $value): static
{ {
return $this->withHeader('Access-Control-Allow-Origin', $value); return $this->withHeader('Access-Control-Allow-Origin', $value);
} }
+6 -6
View File
@@ -69,24 +69,24 @@ interface ResponseInterface extends \Psr\Http\Message\ResponseInterface
/** /**
* @param string $value * @param ?string $value
* @return ResponseInterface * @return ResponseInterface
*/ */
public function withAccessControlAllowOrigin(string $value): ResponseInterface; public function withAccessControlAllowOrigin(?string $value): ResponseInterface;
/** /**
* @param string $value * @param ?string $value
* @return ResponseInterface * @return ResponseInterface
*/ */
public function withAccessControlRequestMethod(string $value): ResponseInterface; public function withAccessControlRequestMethod(?string $value): ResponseInterface;
/** /**
* @param string $value * @param ?string $value
* @return ResponseInterface * @return ResponseInterface
*/ */
public function withAccessControlAllowHeaders(string $value): ResponseInterface; public function withAccessControlAllowHeaders(?string $value): ResponseInterface;