client_management/app/controllers/admin/plow_controller.rb

29 lines
766 B
Ruby

class Admin::PlowController < ApplicationController
include ReverseProxy::Controller
def index
# Assuming the WordPress server is being hosted on port 8080
reverse_proxy "unix://#{Rails.root}/tmp/plow.sock", path: '/' do |config|
# We got a 404!
# config.on_missing do |code, response|
# redirect_to root_url and return
# end
# There's also other callbacks:
# - on_set_cookies
# - on_connect
# - on_response
# - on_set_cookies
# - on_success
# - on_redirect
# - on_missing
# - on_error
# - on_complete
end
end
def show
path = request.env['ORIGINAL_FULLPATH']
reverse_proxy "unix://#{Rails.root}/tmp/plow.sock", path: '/' do |config|
end
end
end