Move list of valid origin prefixes for incoming WebSocket requests to a constant
Summary: Create a constant to hold all valid origin prefixes, for incoming WebSocket requests. This is to make it easier to add additional origins. Reviewed By: mweststrate Differential Revision: D26778708 fbshipit-source-id: b89bd8c8d8925b2863f12c319c6ecbeeb265fc42
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4799ea4f09
commit
d7fc17c12e
@@ -42,4 +42,12 @@ export default Object.freeze({
|
||||
},
|
||||
|
||||
SUPPORT_GROUPS: [],
|
||||
|
||||
// Only WebSocket requests from the following origin prefixes will be accepted
|
||||
VALID_WEB_SOCKET_REQUEST_ORIGIN_PREFIXES: [
|
||||
'chrome-extension://',
|
||||
'localhost:',
|
||||
'http://localhost:',
|
||||
'app://',
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user