Changeset 323 in code for trunk/config


Ignore:
Timestamp:
Jun 7, 2020, 12:13:46 PM (5 years ago)
Author:
contact
Message:

Add support for WebSocket connections

WebSocket connections allow web-based clients to connect to IRC. This
commit implements the WebSocket sub-protocol as specified by the pending
IRCv3 proposal [1].

WebSocket listeners can now be set up via a "wss" protocol in the
listen directive. The new http-origin directive allows the CORS
allowed origins to be configured.

[1]: https://github.com/ircv3/ircv3-specifications/pull/342

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/config/config.go

    r317 r323  
    1515
    1616type Server struct {
    17         Listen    []string
    18         Hostname  string
    19         TLS       *TLS
    20         SQLDriver string
    21         SQLSource string
    22         LogPath   string
     17        Listen      []string
     18        Hostname    string
     19        TLS         *TLS
     20        SQLDriver   string
     21        SQLSource   string
     22        LogPath     string
     23        HTTPOrigins []string
    2324}
    2425
     
    9192                                return nil, err
    9293                        }
     94                case "http-origin":
     95                        srv.HTTPOrigins = append(srv.HTTPOrigins, d.Params...)
    9396                default:
    9497                        return nil, fmt.Errorf("unknown directive %q", d.Name)
Note: See TracChangeset for help on using the changeset viewer.