scottie1984 / swagger-ui-express

Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.43k stars 228 forks source link

Custom robots meta tag #332

Closed wjthieme closed 1 year ago

wjthieme commented 1 year ago

Add the possibility to specify a custom Robots meta through the options parameter in setup and generateHTML. This allows hiding the swagger page from search engines like google by specifying customRobots: "noindex,follow" in the options object.

This is currently not possible though customJs for example as customJs alters the page after load which will then cause crawlers to not pick it up.