diff --git a/frontend/netlify.toml b/frontend/netlify.toml index b87b8d3..3b3ca3d 100644 --- a/frontend/netlify.toml +++ b/frontend/netlify.toml @@ -1,3 +1,10 @@ +[[redirects]] + # Use a proxy because bonsai doesn't support IPv6. + from = "/backend/*" + to = "https://nixos-search-7-1733963800.us-east-1.bonsaisearch.net/:splat" + status = 200 + force = true + [[redirects]] from = "/*" to = "/index.html" diff --git a/frontend/src/index.js b/frontend/src/index.js index 7d4a25f..160e477 100644 --- a/frontend/src/index.js +++ b/frontend/src/index.js @@ -7,7 +7,7 @@ const {Elm} = require('./Main'); Elm.Main.init({ flags: { elasticsearchMappingSchemaVersion: parseInt(process.env.ELASTICSEARCH_MAPPING_SCHEMA_VERSION), - elasticsearchUrl: process.env.ELASTICSEARCH_URL || 'https://nixos-search-7-1733963800.us-east-1.bonsaisearch.net:443', + elasticsearchUrl: process.env.ELASTICSEARCH_URL || '/backend', elasticsearchUsername : process.env.ELASTICSEARCH_USERNAME || 'aWVSALXpZv', elasticsearchPassword : process.env.ELASTICSEARCH_PASSWORD || 'X8gPHnzL52wFEekuxsfQ9cSh', nixosChannels : JSON.parse(process.env.NIXOS_CHANNELS)