Skip to content

How to use an api behind vouch proxy during SPA development from localhost #416

@Choo57

Description

@Choo57

hi friends, quick question if anyone has any experience with this.

We are building a single page app (SPA) that will communicate with an api behind vouch proxy. The finished SPA will run on the same domain as the API so no issues once it is deployed.

During development though, we spin up a local webserver to test the SPA and it runs it on http://localhost:8080. We have the API running on https://demo.mydomain.com/api behind vouch proxy.

Any recommendations to enable the SPA connect to the api during development? API has all the required CORS headers, just could not figure out how vouch proxy can let a request from http://localhost access the protected api so we can streamline development (e.g. would whitelisting by IP work given the totally different domains, protocols etc? or if we can add localhost to vouch_domains and somehow after logging in, can vouch cookie work on multiple domains, with on being on http and the other on https?!).

Other alternative for us would be to set up a locally running api and connect to it during development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions