Skip to content

Commit 2a78201

Browse files
Merge remote-tracking branch 'cloud/cors'
2 parents 243cfe1 + 15bbd09 commit 2a78201

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

solid/lib/Controller/ServerController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ private function createAuthServerConfig() {
106106
*/
107107
public function cors($path) {
108108
$origin = $_SERVER['HTTP_ORIGIN'];
109-
error_log('Allowing in OPTIONS:' . $origin);
110109
return (new DataResponse('OK'))
111110
->addHeader('Access-Control-Allow-Origin', $origin)
112111
->addHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization')
@@ -123,7 +122,7 @@ public function openid() {
123122
$response = new \Laminas\Diactoros\Response();
124123
$server = new \Pdsinterop\Solid\Auth\Server($this->authServerFactory, $this->authServerConfig, $response);
125124
$response = $server->respondToOpenIdMetadataRequest();
126-
return $this->respond($response->addHeader('Access-Control-Allow-Origin', '*'));
125+
return $this->respond($response)->addHeader('Access-Control-Allow-Origin', '*');
127126
}
128127

129128
/**

0 commit comments

Comments
 (0)