ASFHyP3 / hyp3

A processing environment for HyP3 Plugins in AWS.
BSD 3-Clause "New" or "Revised" License
38 stars 8 forks source link

favicon.ico doesn't render correctly #2278

Open asjohnston-asf opened 6 months ago

asjohnston-asf commented 6 months ago

The OpenAPI logo included as a favicon for the swagger UI doesn't render correctly for https://hyp3-api.asf.alaska.edu/ui/

image

Requests to the underlying resources return content, but the content is incorrectly encoded:

asjohnston-asf commented 6 months ago

See https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-payload-encodings.html for more discussion of serving binary content from an API Gateway REST API.

serverless_wsgi already handles the text-vs-binary encoding of the response body for us, so updating binaryMediaTypes in the API Gateway configuration should be sufficient.

jtherrmann commented 6 months ago

Adding:

      BinaryMediaTypes:
        - '*/*'

Under RestApi:Properties: in apps/api/api-cf.yml.j2 fixes the issue for non-EDC deployments. We haven't determined why this solution doesn't work for our EDC deployments.