api-management-developer-portal icon indicating copy to clipboard operation
api-management-developer-portal copied to clipboard

Developer portal in "try mode" does not handle redirect policy correctly

Open Gaploid opened this issue 1 year ago • 0 comments

Bug description

Developer portal in "try mode" does not handle redirect policy correctly

Reproduction steps

  1. Create API
  2. add policy that will do redirect via: <return-response> <set-status code="303" reason="See Other" /> <set-header name="Location" exists-action="override"> <value>https://xxxxx.blob.core.windows.net/latest/yyyy.blob</value> </set-header> </return-response>
  3. go to developer portal and do "try it"
  4. See error## unable to complete the request Image

A clear and concise description of what you expected to happen.

Is self-hosted portal?

Yes and No

Additional context

This scenario is useful for creating an API on top of large blob objects (tens or hundreds of megabytes, or even gigabytes). The API management portal or API won’t be able to proxy such large files due to their size, but a redirect mechanism can handle it. The API policy generates a SAS URL to the blob storage and redirects the client. This works perfectly when tested via curl or even in the browser, but it fails in the developer portal. In the network section, you can see that the redirect occurs, but then it gets canceled.

Gaploid avatar Oct 19 '24 11:10 Gaploid