![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
rack-locale-root-redirect
Advanced tools
Rack::LocaleRootRedirect
redirects requests to "/"
based on the Accept-Language
HTTP header.
Add this line to your application’s Gemfile:
gem 'rack-locale-root-redirect'
And then execute:
$ bundle
Add the rack-locale-root-redirect
gem in your Gemfile
.
gem 'rack-locale-root-redirect'
Add these lines in your config/application.rb
file, along other configuration instructions.
config.use Rack::Accept
config.use Rack::LocaleRootRedirect, fr: '/fr', en: '/en'
Add these lines in your config.ru
file, or wherever your Sinatra application is located.
use Rack::Accept
use Rack::LocaleRootRedirect, fr: '/fr', en: '/en'
$ rackup &
$ curl -sI "http://0.0.0.0:9292" -H "Accept-Language: fr;q=1, en;q=0.8" | grep "302\|Location"
HTTP/1.1 302 Found
Location: /fr
$ curl -sI "http://0.0.0.0:9292" -H "Accept-Language: fr;q=0.4, en;q=0.8" | grep "302\|Location"
HTTP/1.1 302 Found
Location: /en
Rack::LocaleRootRedirect
is © 2013-2015 Mirego and may be freely distributed under the New BSD license. See the LICENSE.md
file.
Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We're a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.
We also love open-source software and we try to give back to the community as much as we can.
FAQs
Unknown package
We found that rack-locale-root-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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.