def register_webapi_capabilities(capabilities_id, caps):
    if not capabilities_id:
        raise ValueError('The capabilities_id attribute must not be None')

    if capabilities_id in _registered_capabilities:
        raise KeyError('"%s" is already a registered set of capabilities'
                       % capabilities_id)

    if capabilities_id in _capabilities_defaults:
        raise KeyError('"%s" is reserved for the default set of capabilities'
                       % capabilities_id)

    _registered_capabilities[capabilities_id] = caps
CORS Specification Section 6.1.1
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/webapi/server_info.py/register_webapi_capabilities--crossover with--dataset/ETHPy150Open openstack/oslo.middleware/oslo_middleware/tests/test_cors.py/CORSRegularRequestTest.test_no_origin_header