Bonsai doesn't support IPv6, so use Netlify as a proxy.
This commit is contained in:
Naïm Favier 2023-05-21 17:24:43 +02:00 committed by GitHub
parent e6ea2208c7
commit dff23cf9c6
Failed to generate hash of commit
2 changed files with 8 additions and 1 deletions

View file

@ -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"

View file

@ -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)