
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Rack middleware for making non-www to www (and conversely) redirects and removing trailing slash in urls. Use it if you can not edit Nginx or Apache rewrite rules.
Add this line to your application's Gemfile:
gem 'rack-seo_redirect'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rack-seo_redirect
# config.ru
require 'rack/seo_redirect'
use Rack::SeoRedirect::Www
use Rack::SeoRedirect::TrailingSlash
run MyApp
Insert to the top of the Rails middleware stack:
# application.rb
config.middleware.insert 0, Rack::SeoRedirect::Www
config.middleware.insert 0, Rack::SeoRedirect::TrailingSlash
Your can pass true or false as a parameter to Www middleware. This indicates either you need www in your url or not.
For non-www to www redirect use:
use Rack::SeoRedirect::Www, true
For www to non-www redirect use:
use Rack::SeoRedirect::Www, false
Default is false (www to non-www).
Your can pass true or false as a parameter to TrailingSlash middleware. This indicates either you need / in the end of your url or not.
For adding / to the end of urls use:
use Rack::SeoRedirect::TrailingSlash, true
For removing / from the end of urls use:
use Rack::SeoRedirect::TrailingSlash, false
Default is false (removing trailing slash).
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that rack-seo_redirect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.