from fastapi import Header, HTTPException

def get_session_id(session_id: str = Header(..., alias="X-Session-Id")):
    if not session_id:
        raise HTTPException(status_code=400, detail="Session ID no trobat")
    return session_id
