oatpp / oatpp-swagger

OpenApi 3.0.0 docs + Swagger UI for oatpp services
https://oatpp.io/
Apache License 2.0
90 stars 51 forks source link

Content-Type not set for CSS or JS responses #69

Closed oglimmer closed 1 year ago

oglimmer commented 1 year ago

ISSUE:

http responses to any .css or .js files do not set the http header "Content-Type".

This is not correct and this gets a real issue when running behind proxy server which sets a default content type if none is set.

HOW TO REPRODUCE

FIX

ok this is not a real fix, thus I haven't created a PR, but it gives an idea what could fix the problem:

https://github.com/oglimmer/oatpp-swagger/commit/159bf26bcf1d24cf00f25c3541c3fc6c3b541cc1

lganzzzo commented 1 year ago

Hello @oglimmer ,

Thanks for the issue!

ok this is not a real fix, thus I haven't created a PR, but it gives an idea what could fix the problem:

This looks good enough for swagger resources. Please add the same for AsyncController and please send your PR!

Regards, Leonid

oglimmer commented 1 year ago

Sent PR, see https://github.com/oatpp/oatpp-swagger/pull/71