How to use the mwp-config.package function in mwp-config

To help you get started, we’ve selected a few mwp-config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github meetup / meetup-web-platform / packages / mwp-api-proxy-plugin / src / util / send.js View on Github external
export function parseRequestHeaders(request) {
	const externalRequestHeaders = {
		...request.headers,
		...getAuthHeaders(request),
		...getClientIpHeader(request),
		...getTrackingHeaders(request),
		'accept-language': getLanguageHeader(request),
		'x-meetup-agent': config.package.agent,
		'x-meetup-parent-request-id': request.id,
	};

	delete externalRequestHeaders['host']; // let app server set 'host'
	delete externalRequestHeaders['accept-encoding']; // let app server set 'accept'
	delete externalRequestHeaders['content-length']; // original request content-length is irrelevant
	delete externalRequestHeaders['content-type']; // the content type will be set in buildRequestArgs

	return externalRequestHeaders;
}
github meetup / meetup-web-platform / packages / mwp-api-proxy-plugin / src / util / send.js View on Github external
export function parseRequestHeaders(request) {
	const externalRequestHeaders = {
		...request.headers,
		...getAuthHeaders(request),
		...getClientIpHeader(request),
		...getTrackingHeaders(request),
		'accept-language': getLanguageHeader(request),
		'x-meetup-agent': config.package.agent,
		'x-meetup-parent-request-id': request.id,
	};

	delete externalRequestHeaders['host']; // let app server set 'host'
	delete externalRequestHeaders['accept-encoding']; // let app server set 'accept'
	delete externalRequestHeaders['content-length']; // original request content-length is irrelevant
	delete externalRequestHeaders['content-type']; // the content type will be set in buildRequestArgs

	return externalRequestHeaders;
}

mwp-config

All the config you might ever need for a MWP app

MIT
Latest version published 2 years ago

Package Health Score

39 / 100
Full package analysis

Similar packages