@gravityforms/gulp-tasks
Version:
Configurable Gulp tasks for use in Gravity Forms projects.
35 lines (33 loc) • 956 B
JavaScript
const findConfig = require( 'find-config' );
const localConfig = findConfig.require( 'local-config.json' );
module.exports = {
allowedHosts: [ localConfig?.proxy || '' ],
client: {
overlay: {
errors: true,
warnings: false,
},
webSocketURL: {
hostname: localConfig?.proxy || 'localhost',
port: localConfig?.port || 9003,
protocol: 'wss',
},
},
compress: true,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
},
host: localConfig?.proxy || 'localhost',
hot: true,
liveReload: false,
port: localConfig?.port || 9003,
server: {
type: 'https',
options: {
key: localConfig?.certs_path ? `${ localConfig.certs_path }/${ localConfig.proxy }.key` : '',
cert: localConfig?.certs_path ? `${ localConfig.certs_path }/${ localConfig.proxy }.crt` : '',
},
},
};