Skip to content

Parse host domain in config #3

@robertvanhoesel

Description

@robertvanhoesel

When initializing the SDK with a url that ends with a slash, the SDK won't accept incoming events, as postMessage only contain the origin (scheme + host + port) and not a full url. We do a exact match on the domain set in the config.

new Crowded({
    domain: "https://yourcommmunity.com/" // hostname of the community
                                       ^ will not work
});

We should change this, let domain always be just a domain (without scheme or path segments), prepend it with the scheme ourselves (should always be https) and maybe sanitize the input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions