Skip to content

feat(api): allow all CORS origins#24

Merged
artur-abliazimov merged 1 commit intomainfrom
bugfix/restore-lock
May 6, 2026
Merged

feat(api): allow all CORS origins#24
artur-abliazimov merged 1 commit intomainfrom
bugfix/restore-lock

Conversation

@artur-abliazimov
Copy link
Copy Markdown
Collaborator

@artur-abliazimov artur-abliazimov commented May 6, 2026

Summary by CodeRabbit

  • New Features
    • Enabled CORS (Cross-Origin Resource Sharing) support on the API server, allowing clients from different origins to access the API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@artur-abliazimov artur-abliazimov merged commit 0963b50 into main May 6, 2026
4 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 45a6ae70-c9bf-48dd-a0d0-e2cfd5f4e8d1

📥 Commits

Reviewing files that changed from the base of the PR and between 17c9f96 and 07d2503.

📒 Files selected for processing (1)
  • packages/api/src/main.rs

📝 Walkthrough

Walkthrough

The API server now enables permissive Cross-Origin Resource Sharing (CORS) by importing CorsLayer and applying it to the Axum Router middleware stack. This allows cross-origin requests from any client without restriction.

Changes

CORS Middleware Configuration

Layer / File(s) Summary
Import
packages/api/src/main.rs (line 8)
CorsLayer imported from tower_http::cors.
Middleware Registration
packages/api/src/main.rs (line 57)
CorsLayer::very_permissive() added to the router's middleware chain to permit all cross-origin requests.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A hop, a skip, cross-origin flight,
CORS now opens borders wide and bright,
Permissive layers greet each guest,
The API welcomes all the rest! 🌐

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/restore-lock

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant