Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger doesn't return Content-Type #91

Open
Alexey182 opened this issue Jul 9, 2024 · 0 comments
Open

Swagger doesn't return Content-Type #91

Alexey182 opened this issue Jul 9, 2024 · 0 comments

Comments

@Alexey182
Copy link

curl -v localhost:8810/swagger/ui/
*   Trying 127.0.0.1:8810...
* Connected to localhost (127.0.0.1) port 8810 (#0)
> GET /swagger/ui/ HTTP/1.1
> Host: localhost:8810
> User-Agent: curl/7.88.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 734
< Connection: keep-alive
< Server: oatpp/1.4.0
<
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Swagger UI</title>
    <link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
    <link rel="stylesheet" type="text/css" href="index.css" />
    <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
    <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
  </head>

  <body>
    <div id="swagger-ui"></div>
    <script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
    <script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
    <script src="./swagger-initializer.js" charset="UTF-8"> </script>
  </body>
</html>
* Connection #0 to host localhost left intact

As you can see, there is no Content-Type header. The problem is that browser doesn't recognize it as html and shows plain text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant