mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-22 22:06:43 +00:00
15 lines
309 B
Ruby
15 lines
309 B
Ruby
module SwaggerRails
|
|
class SwaggerUi < ActionDispatch::Static
|
|
IGNORE_PATHS = [ '', '/', '/index.html' ]
|
|
|
|
def call(env)
|
|
# Serve index.html via swagger_ui_controller
|
|
if IGNORE_PATHS.include?(env['PATH_INFO'])
|
|
@app.call(env)
|
|
else
|
|
super(env)
|
|
end
|
|
end
|
|
end
|
|
end
|