]> cat aescling's git repositories - mastodon.git/blob - app/controllers/api/v1/streaming_controller.rb
Clean up for api/base controller (#3629)
[mastodon.git] / app / controllers / api / v1 / streaming_controller.rb
1 # frozen_string_literal: true
2
3 class Api::V1::StreamingController < Api::BaseController
4 respond_to :json
5
6 def index
7 if Rails.configuration.x.streaming_api_base_url != request.host
8 uri = URI.parse(request.url)
9 uri.host = URI.parse(Rails.configuration.x.streaming_api_base_url).host
10 redirect_to uri.to_s, status: 301
11 else
12 raise ActiveRecord::RecordNotFound
13 end
14 end
15 end
This page took 0.087615 seconds and 4 git commands to generate.