<commit_before>import Route from '@ember/routing/route';

export default Route.extend({
  redirect() {
    window.location = 'https://doc.rust-lang.org/cargo/getting-started/installation.html';
  },
});
<commit_msg>Make /install work under FastBoot<commit_after>import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';

export default Route.extend({
  fastboot: service(),

  redirect() {
    this._redirectTo('https://doc.rust-lang.org/cargo/getting-started/installation.html');
  },

  _redirectTo(url) {
    if (this.fastboot.isFastBoot) {
      let headers = this.fastboot.response.headers;
      headers.set('location', url);
      this.set('fastboot.response.statusCode', 301);
    } else {
      window.location = url;
    }
  },
});

{'fraction_non_alphanumeric': 0.15681233933161953, 'fraction_numerical': 0.0038560411311053984, 'mean_word_length': 3.75, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1031671', 'n_tokens_mistral': 250, 'n_tokens_neox': 242, 'n_words': 44}