Customizing OneDrive sites is not supported.
SharePoint 2019 on premise REST API
Hi there,
I have two site collection: one is Personal Site Host another is Team Site. I customize a OneDrive for every personal site for control each site status. there are some code I added in OneDrive.aspx. you could refer to the attachment. If we access the personal site, everything works nicely. On the contrary, If we access the Team Site, the OneDrive.aspx also will be involved and the custom JS will be performed, then I got the following error:
Here is the OneDrive.aspx I amended.
The error code is (Red line):
Does anyone have any idea on it? thanks
Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint Server | Development
2 answers
Sort by: Most helpful
-
-
sadomovalex 3,636 Reputation points2021-03-01T15:43:11.867+00:00 looks like at least ports of your Teams site and My Site host are different. In order to avoid CORS problem protocol, host and port should be the same: CORS error on same domain.