solo-io / gloo-portal-issues

Public tracker for issues related to Gloo Portal
https://docs.solo.io/gloo-portal/latest/
1 stars 3 forks source link

Custom CORS configuration for Gloo Portal + Istio Integration #120

Closed ably77 closed 2 years ago

ably77 commented 2 years ago

Is your feature request related to a problem? Please describe.

Reference Custom CORS configuration #106

The issue above addresses custom CORS configuration for Gloo Portal + Gloo Edge, but does not extend to Gloo Portal + Istio. For users testing Gloo Portal + Istio this results in the "Try it Now" feature to fail with CORS Network Failure

image

Manually modifying the Istio VirtualService and adding corsPolicy.allowCredentials: true resolves the CORS issue in the Gloo Portal UI temporarily, but any change in any Portal CR will revert back to the default non-customizable values.

Example valid cors policy that worked for me:

- corsPolicy:
      allowHeaders:
      - api-key
      - Authorization
      allowCredentials: true
      allowOrigins:
      - exact: http://petstore.example.com
      - exact: https://petstore.example.com

image

Describe the solution you'd like A clear and concise description of what you want to happen.

Would like to see Custom CORS configuration be able to be provided by the user for Gloo Portal + Istio integration, ideally could be provided through the Gateway Options tab feature in the UI. Specifically to add the allowCredentials: true to the default, but can also see the customers customizing other entries in the corspolicy potentially as well such as providing additional configuration in allowHeaders and allowOrgins

Describe alternatives you've considered Cannot move forward at this point because workaround to fix CORS issue manually in Istio VirtualService will be reverted by Portal Controller on any detected change