fastify / fastify-swagger

Swagger documentation generator for Fastify
MIT License
941 stars 209 forks source link

swagger page blank because all assets request load from HTTPS instead of HTTP #690

Closed roninaruka closed 1 year ago

roninaruka commented 1 year ago

Prerequisites

Fastify version

4.0.0

Plugin version

7.4.1

Node.js version

16.18.1

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

20.04

Description

running on system ip

Steps to Reproduce

image image

Expected Behavior

No response

climba03003 commented 1 year ago

It in intended browser behavior. We provide upgrade-insecure-requests in CSP which will automatically upgrade the http to https when the host is not localhost. I don't see the need of remove it as it is a good behavior for having it.

climba03003 commented 1 year ago

You can always use transformStaticCSP option to remove the unwanted part for CSP