Skip to content

Feature request: support custom hostname / non-localhost origin for the static server #162

Description

@ltamazouzt

Hi, and thanks for maintaining this library!

We are using react-native-static-server to serve a bundled a web page inside a React Native WebView. The webpage makes HTTP requests to our cloud API to load big files and metadata.

Currently the server is started with hostname: 'localhost', which means the WebView origin is http://localhost:8080. Because our cloud API is on a different domain, these requests are cross-origin, and the API must include http://localhost:8080 (or a wildcard) in its Access-Control-Allow-Origin response header which is a problem for us.

Would it be possible to support a custom hostname or a non-localhost origin?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issue.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions