简体   繁体   中英

Custom route for active admin in rails 4

I'd like to make activeadmin interface to respond at a url like this

http://somesite.com/long_and_strange_string_of_charaters 

Does anybody know how to do it?

I think that a website should give a 404 not found on the admin subpage.

http://somesite.com/admin  => 404

I think it is a security issue that a hacker gets a form to play with on this url.

With this in the routes.rb

ActiveAdmin.routes(self)

You get the admin interface on the /admin route

Should have read even more in the documentations.

in config/initializers/active_admin.rb

ActiveAdmin.setup do |config|
   config.default_namespace = :long_and_strange_string_of_charaters
end

Hope it will help someone, sometime.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM