Skip to content

Instantly share code, notes, and snippets.

View philipp-lein's full-sized avatar
🚀
DevBoost!

Philipp Lein philipp-lein

🚀
DevBoost!
View GitHub Profile
@philipp-lein
philipp-lein / gist:73d126dda78033feaa759e514ad3caee
Created September 26, 2025 08:23
Challenge: Download with http cookie
from fastapi import FastAPI, HTTPException, Depends, Request, Response, Form
from fastapi.responses import StreamingResponse, HTMLResponse
from fastapi.middleware.cors import CORSMiddleware
import jwt
from datetime import datetime, timedelta
app = FastAPI(title="Download with Auth Playground")
# Einfache Konfiguration
SECRET_KEY = "super-secret-playground-key-change-in-production"