You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: external_redirect_controller.rb
    path of file: ./repos/gitlabhq/app/controllers/external_redirect
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

mod
    
    def index
      if known_url?
        redirect_to url_param
      else
        render layout: 'fullscreen', locals: {
          url: url_param
        }
      end