Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function setup(app, done) {
log('start setup')
Aws.config.update({
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
})
app.use(noFavicon())
app.use(helmet())
app.use(compression())
app.use('/image', S3Router({
bucket: process.env.S3_IMAGE_BUCKET,
region: process.env.AWS_REGION,
signatureVersion: 'v4',
headers: { 'Access-Control-Allow-Origin': '*' },
ACL: 'public-read',
uniquePrefix: true,
}))
if (DEV) {
const clientConfig = require('../../webpack/client.dev')
const serverConfig = require('../../webpack/server.dev')
const webpackDevMiddleware = require('webpack-dev-middleware')
const webpackHotMiddleware = require('webpack-hot-middleware')
const webpackHotServerMiddleware = require('webpack-hot-server-middleware')
const publicPath = clientConfig.output.publicPath