Azure / api-management-developer-portal

Developer portal provided by the Azure API Management service.
MIT License
478 stars 306 forks source link

Custom widget can not call an API of APIM - Origin null is not allowed by Access-Control-Allow-Origin #2482

Closed girish-tank-avnet closed 1 month ago

girish-tank-avnet commented 1 month ago

Bug description

we have imported an Azure function as an API into Azure APIM and we have created a custom widget which signup an user. The issue arises when calling an that imported azure function API of APIM through a custom widget using the endpoint "/external/processApimDevPortalFunc-ext/fnUserSignup".

While this operation functions correctly on Google Chrome, Safari users encounter a Cross-Origin Resource Sharing (CORS) error. It's essential to investigate and address this discrepancy, specifically within the context of the custom widget, to ensure proper functionality across both browsers.

Also i have noticed that similar type of issue is already create earlier with following link https://github.com/Azure/api-management-developer-portal/issues/2364 and closed too. in this ticket @malincrist commented that this issue is already resolved and will be release on 2.26 release version.

I have checked with my developer portal version using this link "/internal-status-0123456789abcdef" and get the "CodeVersion": "20231117172035".. this means that my developer portal updated on last by 11/17/2023 and if we see the release note on GIT i have developer portal version 2.24.0

if this is correct then let me know how i can create request to update my developer portal with latest version.

Reproduction steps

  1. Create a custom widget where you call the endpoint GET /external/processApimDevPortalFunc-ext/fnUserSignup
  2. Deploy this widget to the developer portal and embed it on the page
  3. Go to the page with the widget on Safari and open the Developer Tools See console error: image

Expected behavior

/external/processApimDevPortalFunc-ext/fnUserSignup should be called without getting CORS error.

Is your portal managed or self-hosted?

Managed

Environment

The request works on Chrome without an issue. The request for sandboxed iframe requests on Safari always set the origin to null.

sthirthala commented 1 month ago

Please raise Azure support ticket for managed portal issues