You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://github.com/pdsinterop/solid-nextcloud#manual-install instructs the user to enable CORS headers on the entire server, which is overkill and DANGEROUS because it could allow cross-site scripting to other Nextcloud apps if the user is logged in with a cookie.
Putting it in the Directory works for /var/www/html but not if you put it in /var/www/apps/solid because according to apache all requests are handled by /var/www/html/index.php.
Access to fetch at 'https://cloud.pondersource.org/index.php/apps/solid/jwks' from origin 'https://noeldemartin.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Activity
michielbdejong commentedon Nov 24, 2021
https://github.com/pdsinterop/solid-nextcloud#manual-install instructs the user to enable CORS headers on the entire server, which is overkill and DANGEROUS because it could allow cross-site scripting to other Nextcloud apps if the user is logged in with a cookie.
michielbdejong commentedon Nov 24, 2021
should work with a directory tag, too:
a2enmod headersand then:michielbdejong commentedon Nov 24, 2021
Putting it in the Directory works for /var/www/html but not if you put it in /var/www/apps/solid because according to apache all requests are handled by /var/www/html/index.php.
michielbdejong commentedon Nov 24, 2021
Maybe we should uncomment https://github.com/pdsinterop/php-solid-crud/blob/b6816c0/src/Server.php#L117-L123
So then at least all the routes on the storage would get CORS headers and then we would only need to deal with /.well-known/openid-provider separately.
Add CORS headers at the php-solid-crud level
michielbdejong commentedon Nov 24, 2021
Ah, using that ^ and in addition, if you create a static file:
mkdir -p /var/www/html/.well-known curl https://cloud.pondersource.org/index.php/apps/solid/openid > /var/www/html/.well-known/openid-configurationAdd this to your /etc/apache2/sites-enabled/000-default.conf:
and then:
Then it works! :)
michielbdejong commentedon Nov 24, 2021
Testing this out now... next error:
So that needs the same edit in https://github.com/pdsinterop/php-solid-auth/blob/b08a3910d49535afd3d77db264badcd564f31f6e/src/Server.php#L148
michielbdejong commentedon Sep 27, 2022
Fixed in #93
Potherca commentedon Sep 27, 2022
@michielbdejong Can we close this issue?
michielbdejong commentedon Sep 27, 2022
@Potherca it will be closed automatically when #93 is merged
michielbdejong commentedon Sep 27, 2022
Ah, actually that wasn't true when I wrote it but it is true now :)