-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabled OCS Share API CORS #1
Comments
Thank you for your suggestion. |
Hi |
I am looking too at how this could be solved... Adding the annotation
allows the sharing api to be used from an external url to create a share (not a surprise as it's said in https://docs.nextcloud.com/server/22/developer_manual/digging_deeper/rest_apis.html#rest-apis ). Altering the core files_sharing app isn't the way to go, but I cannot find any event to listen and react, to adapt the response to OPTIONS and POST method request to /api/v1/shares files_share route. This would help when using the api in a dedicated app ... Something like https://symfony.com/doc/current/reference/events.html#kernel-response would be great But using symfony events is discouraged I'll keep looking. |
I end up extending the files_sharing shareapi controller in a new app https://gitlab.com/communia/files_sharing_webapppassword to add a check origin applied to the original response. Maybe this could be added to webapppassword app or remain as separated app. Also, maybe this could be proposed in nextcloud/server repo (as was asked in nextcloud/server#3131) : |
Nice. If you want to integrate it into webapppassword, I can review the pull request. |
There now is a new release, could you please test it and report if it works for you? |
I released it on https://apps.nextcloud.com/apps/webapppassword as well. |
Just adding that a draft PR is being proposed in: nextcloud/server#37896 and in related issue. |
Great, I'll close this then. |
Hello,
Can you add the possibility to enabled CORS pour OCS Share API (https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-share-api.html) ? Webdav don't support sharing links...
Thanks ^^
The text was updated successfully, but these errors were encountered: