petercat-ai / petercat

A conversational Q&A agent configuration system, self-hosted deployment solutions, and a convenient all-in-one application SDK, allowing you to create intelligent Q&A bots for your GitHub repositories
https://petercat.ai
MIT License
618 stars 18 forks source link

feat: allow anouymouse cors by token #399

Closed RaoHai closed 2 months ago

RaoHai commented 2 months ago
vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 15, 2024 6:12am
petercat-assistant[bot] commented 2 months ago

Walkthrough: 该PR允许在SDK接入时通过token放开CORS限制。

Changes: 文件 概要
server/auth/middleware.py 修改了中间件逻辑,增加了对CORS的支持
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 96.92308% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/auth/middleware.py 0.00% 1 Missing :warning:
server/tests/auth/test_middleware.py 97.56% 1 Missing :warning:
Files with missing lines Coverage Δ
server/auth/cors_middleware.py 100.00% <100.00%> (ø)
server/main.py 92.15% <100.00%> (+0.32%) :arrow_up:
server/tests/test_main.py 100.00% <ø> (ø)
server/auth/middleware.py 75.00% <0.00%> (+33.69%) :arrow_up:
server/tests/auth/test_middleware.py 97.56% <97.56%> (ø)

... and 3 files with indirect coverage changes