Create a .env file in the root of the project with the content copied of env-sample.
gatsby build
The search endpoint is protected by Cloudflare Turnstile to prevent abuse from bots.
- Go to Cloudflare Dashboard and create a new Turnstile widget
- Choose "Invisible" mode for seamless user experience
- Add your domain to the allowed hostnames
- Copy the Site Key and Secret Key
Add these to your .env file (local) and Netlify environment variables (production):
GATSBY_TURNSTILE_SITE_KEY=your-site-key # Public, exposed to browser
TURNSTILE_SECRET_KEY=your-secret-key # Private, server-side only
Note: The GATSBY_ prefix is required for Gatsby to expose the variable to the browser. The site key is safe to expose publicly.
When running on localhost in the browser, search uses MSW mock data for /search-cases.
- This keeps frontend development working without local functions.
- Deployed function search remains unchanged and continues to use the real backend.
Please refer to the following Wiki pages:
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.