예제 #1
0
def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    config = get_configurator(global_config, **settings)
    app = config.make_wsgi_app()
    refreshListsConfigThread = RefreshListsConfigThread(
        config.registry.settings.get('shavar.refresh_lists_delay',
                                     DEFAULT_REFRESH_LISTS_DELAY), config)
    refreshListsConfigThread.daemon = True
    refreshListsConfigThread.start()
    return app
예제 #2
0
def main(global_config, **settings):
    """Load a SyncStorage WSGI app from deployment settings."""
    config = get_configurator(global_config, **settings)
    application = AccessControlMiddleware(
        config.make_wsgi_app(), allow_origin='*',
        allow_methods=('GET','POST','PUT','DELETE','OPTIONS'),
        allow_headers=('X-Authorization', 'Authorization',
                       'X-If-Modified-Since', 'X-If-Unmodified-Since',
                       'Content-Type', 'X-Requested-With', 'X-Client-State'),
        expose_headers=('X-Weave-Timestamp', 'X-Weave-Backoff',
                        'X-Weave-Alert', 'X-Weave-Records'))
    return application
예제 #3
0
def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    config = get_configurator(global_config, **settings)
    app = config.make_wsgi_app()
    refreshListsConfigThread = RefreshListsConfigThread(
        config.registry.settings.get(
            'shavar.refresh_lists_delay', DEFAULT_REFRESH_LISTS_DELAY
        ),
        config
    )
    refreshListsConfigThread.daemon = True
    refreshListsConfigThread.start()
    return app
예제 #4
0
def main(global_config={}, **settings):
    """Load a SyncStorage WSGI app from deployment settings."""
    config = get_configurator(global_config, **settings)
    return config.make_wsgi_app()
예제 #5
0
def main(global_config, **settings):
    config = get_configurator(global_config, **settings)
    return config.make_wsgi_app()
예제 #6
0
def main(global_config, **settings):
    """Load a SyncStorage WSGI app from deployment settings."""
    config = get_configurator(global_config, **settings)
    return config.make_wsgi_app()
예제 #7
0
def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    config = get_configurator(global_config, **settings)
    return config.make_wsgi_app()
예제 #8
0
파일: __init__.py 프로젝트: mozilla/trunion
def main(global_config, **settings):
    config = get_configurator(global_config, **settings)
    return config.make_wsgi_app()