diff --git a/app/controllers/jump_controller.rb b/app/controllers/jump_controller.rb new file mode 100644 index 000000000..37061c98e --- /dev/null +++ b/app/controllers/jump_controller.rb @@ -0,0 +1,8 @@ + +class JumpController < ApplicationController + before_action :authenticate_user! + + def index + redirect_to("//#{params[:destin]}/#{params[:path]}") + end +end diff --git a/config/routes.rb b/config/routes.rb index e43e201a5..4264947dc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -451,6 +451,8 @@ Rails.application.routes.draw do get '/about/more', to: 'about#more' get '/terms', to: 'about#terms' + get '/jump/:destin/(*path)', to: 'jump#index', :constraints => { :destin => /[0-z\.]+/ } + match '/', via: [:post, :put, :patch, :delete], to: 'application#raise_not_found', format: false match '*unmatched_route', via: :all, to: 'application#raise_not_found', format: false end