Skip to content

Use loopback address not "localhost" to contact Hub #7

Open

Description

@mbtaylor

Currently samp.js uses the well-known URL "http://localhost:21012/" to contact the hub.

In order to permit access from an HTTPS web page, the Hub URL should qualify as "Potentially Trustworthy" in the sense of the W3C Secure Contexts document, which means it should use the numeric loopback address "127.0.0.1" (IPv4) or "::1" (IPv6) as the hostname rather than "localhost". Note that later versions of Secure Contexts may allow "localhost" as well, but changing it is likely to improve compatibility with existing software.

Changing "localhost" -> "127.0.0.1" on line 365 of samp.js is easy to do, but I don't know how to test for IPv6 in order to pick the right form, and I don't have an IPv6 machine to test on. If somebody does, can they make this change?

Activity

  1. mbtaylor commented on Nov 12, 2019

    @mbtaylor
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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