// configure the openui5 connect server
module.exports = function(grunt, config) {

	// libraries are sorted alphabetically
	var aLibraries = config.allLibraries.slice();
	aLibraries.sort(function(a, b) {
		return a.name.localeCompare(b.name);
	});

	var openui5_connect = {

		options: {

			contextpath: config.testsuite.name,
			proxypath: 'proxy',
			cors: {
				origin: "*"
			}

		},

		src: {

			options: {

				appresources: config.testsuite.path + '/src/main/webapp',

				resources: aLibraries.map(function(lib) {
					return lib.path + '/src';
				}),

				testresources: aLibraries.map(function(lib) {
					return lib.path + '/test';
				})

			}

		},

		target: {

			options: {

				appresources: 'target/openui5-testsuite',

				resources: aLibraries.map(function(lib) {
					return 'target/openui5-' + lib.name + '/resources';
				}),

				testresources: aLibraries.map(function(lib) {
					return 'target/openui5-' + lib.name + '/test-resources';
				})

			}

		}

	};

	return openui5_connect;

};

// configure the openui5 connect server
module.exports = function(grunt, config) {

	// libraries are sorted alphabetically
	var aLibraries = config.allLibraries.slice();
	aLibraries.sort(function(a, b) {
		return a.name.localeCompare(b.name);
	});

	var openui5_connect = {

		options: {

			contextpath: config.testsuite.name,
			proxypath: 'proxy',
			proxyOptions: {
				secure: false
			},
			cors: {
				origin: "*"
			}

		},

		src: {

			options: {

				appresources: config.testsuite.path + '/src/main/webapp',

				resources: aLibraries.map(function(lib) {
					return lib.path + '/src';
				}),

				testresources: aLibraries.map(function(lib) {
					return lib.path + '/test';
				})

			}

		},

		target: {

			options: {

				appresources: 'target/openui5-testsuite',

				resources: aLibraries.map(function(lib) {
					return 'target/openui5-' + lib.name + '/resources';
				}),

				testresources: aLibraries.map(function(lib) {
					return 'target/openui5-' + lib.name + '/test-resources';
				})

			}

		}

	};

	return openui5_connect;

};

Disable proxy "secure" option for better local testing
[INTERNAL] Grunt: Disable proxy "secure" option for better local testing

As the "grunt serve" server is only intended to be used for local
testing it is fine to allow insecure connections.

Change-Id: I7141af5d6340340f27ce80ecc7413f50ee553408
