Skip to content

Dynamically switch API endpoint to local server when running in development environment #108

@KGFCH2

Description

@KGFCH2

Problem

script.js has a hardcoded URL for the check endpoint (https://cybershield-sxz0.onrender.com/check). This prevents developer testing against a locally running server.js instance.

Proposed Solution

Detect if the frontend is loaded on a local domain (localhost/127.0.0.1) and dynamically fallback to the local host port (or configurable port) for api calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions