Skip to content

Rewriting mechanic  #447

@TuzelKO

Description

@TuzelKO

Hello! It would be useful to implement a rewrite mechanism, thanks to which different addresses could be passed to a single entry point, as does e.g. Nginx.

For example, I have several addresses: ws://ip:port/category1/action1, ws://ip:port/category1/action2, ws://ip:port/category2/action1... I would like all these connections to be poured into one script, and the path to be passed, for example, as a launch argument, so that the script’s internal router can decide what to do.

This function will allow you to easily integrate many PHP frameworks with WebSocketD.You can also make the setting with one argument at startup (--url-to-argv or --url-rewriting). The launched script will in turn receive this address as the first argument (php my-ws-script.php "/path/from/address")

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