Serve Netlify Redirects During Build

I have an emberJS project that uses prember to pre-render certain pages, in addition to netlify redirects to proxy over to another server to avoid CORS issues, but I need the netlify redirects to also work during build in order to pre-render the pages.

Is it possible to enable netlify redirects during build so that the reverse proxy I’ve set up using netlify redirects is made available to the building app?

I have tried netlify build to no avail. Please advise.

Update: I did manage to find a semi-solution, checking for Fastboot in the application adapter, thus modifying host:

import {reads} from "@ember/object/computed";
import {inject as service} from "@ember/service";

export default ApplicationAdapter extends RESTAdapter {
  @service fastboot;
  @reads("fastboot.isFastBoot") isFastBoot;

  get host() {
    return this.isFastboot ? ENV.apiURL : ENV.httpProxyURL;

Of course, it would still be ideal to not have to manage two different API URLs and to simply leave the “proxied” URL in the _netlify_redirects file and to rely on the reverse proxy in all situations, even when Fastboot makes requests to pre-render. I will leave this thread open if anyone from support knows of a way to run netlify redirects during netlify build.

Hey there, @srger :wave:

Thanks for reaching out! Can you please share a link to your project site? This will help us look into your specific case further. Thanks so much :slight_smile: