Skip to content

Releases: georgekhananaev/fastapi-docshield

v0.2.1

17 Aug 11:39

Choose a tag to compare

Version 0.2.1 (2025-08-17)

  • Fixed: Blank page issue after authentication for some users
    • Improved handling of custom URL parameters by storing them as instance variables
    • Simplified _setup_routes() method for better maintainability
    • Applied fix from PR #2 for more robust URL parameter handling
  • Fixed: Route removal logic now correctly removes all default documentation routes
    • Properly removes /docs, /redoc, and /openapi.json endpoints
    • Prevents 500 errors when accessing old endpoints
  • Improved: Example files and documentation
    • Fixed custom_styling.py to work with uvicorn by adding default app variable
    • Standardized credentials across all custom styling examples
    • Added python-multipart to dev dependencies for form data handling
    • Added clear run instructions in example files

Full Changelog: v0.2.0...v0.2.1

v0.2.0

17 Aug 10:41

Choose a tag to compare

  • Added: Custom CSS and JavaScript injection support
    • New custom_css parameter to inject custom styles into documentation pages
    • New custom_js parameter to inject custom JavaScript for enhanced functionality
    • Complete customization examples for dark theme, minimal theme, corporate branding, and analytics
    • Support for both Swagger UI and ReDoc customization
  • Added: Automatic CDN fallback to local files for better reliability
    • Documentation now automatically falls back to bundled static files if CDN is unavailable
    • New prefer_local option to always serve from local files
    • New use_cdn_fallback option to control fallback behavior
    • Bundled Swagger UI and ReDoc static files for offline capability
  • Fixed: Static file URL bug that caused blank documentation pages
    • Previously, when no custom CDN URLs were provided, the package would pass None values to FastAPI's documentation functions
    • This resulted in HTML with href="None" and src="None", causing white/blank pages
    • Now properly handles default CDN URLs when custom URLs are not specified

Full Changelog: v0.1.0...v0.2.0

v0.1.0

07 May 15:05

Choose a tag to compare

FastAPI DocShield v0.1.0 - Initial Release

A lightweight FastAPI middleware that protects your API documentation endpoints with authentication.

Features

  • Simple integration with FastAPI applications
  • Protects Swagger UI, ReDoc, and OpenAPI JSON/YAML endpoints
  • Customizable authentication methods
  • Minimal performance impact
  • Fully tested with Python 3.7-3.13

Usage

from fastapi import FastAPI
from fastapi_docshield import DocShield

app = FastAPI()
DocShield(app, username="admin", password="secure_password")

This is the first stable release of FastAPI DocShield.