Overview
Cors::Ui is a Rails Engine that provides a web interface for inspecting and testing CORS (Cross-Origin Resource Sharing
) configurations in your Rails application.
Cross-Origin Resource Sharing (CORS
) is a security feature that restricts cross-origin HTTP requests. In Rails, you can configure CORS using the rack-cors
gem to define allowed origins, methods, and headers.
Installation
Add this line to your application's Gemfile:
gem "cors-ui"
Then execute:
bundle install
Or install it manually:
gem install cors-ui
Integration
After installation, mount the engine in your config/routes.rb
file:
mount Cors::Ui::Engine, at: "/cors"
This will make the CORS UI accessible at /cors
in your application.
Usage
Once the engine is mounted, you can access the UI to configure CORS settings visually. The interface allows you to:
- Visualize CORS configurations across your application
- Inspect CORS settings for different routes
- View default CORS headers and configurations
- Easy integration with Rails applications
Home View:

Dashboard View:

Contributing
We welcome contributions! If you'd like to improve the project:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit (
git commit -m "Your message"
). - Push to your branch (
git push origin feature-branch
). - Open a Pull Request.
License
This gem is available as open-source under the terms of the MIT License.