Class: WrapItRuby::ProxyController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- WrapItRuby::ProxyController
- Includes:
- IframeHelper, MenuHelper
- Defined in:
- app/controllers/wrap_it_ruby/proxy_controller.rb
Instance Method Summary collapse
Methods included from IframeHelper
Methods included from MenuHelper
#all_menu_items, #all_proxy_menu_items, #menu_config, #proxy_paths, #render_menu, #render_menu_modals, #reset_menu_cache!
Instance Method Details
#show ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/wrap_it_ruby/proxy_controller.rb', line 8 def show .then do || target_path = request.path.delete_prefix(["route"]) target_domain = ["url"] target_url = "#{target_domain}/#{target_path}" proxy_host = ENV["WRAP_IT_PROXY_HOST"] @iframe_src = proxy_host ? "//#{proxy_host}/_proxy/#{target_url}" : "/_proxy/#{target_url}" end end |