Home

Issue: 2657

AWS Failed to execute 'setRequestHeader' on 'XMLHttpRequest' with Evaporate.js

[issue link]

I’m using the Evaporate (https://github.com/TTLabs/EvaporateJS) to upload my files to S3. The app is in Vue/Nuxt.js setup, and this is my AWS config:

    const uploadApiConfig = {
        signerUrl: '/api/sign_auth',
        awsRegion: process.env.awsRegion,
        aws_key: process.env.awsKey,
        bucket: process.env.awsBucket,
        computeContentMd5: true,
        awsSignatureVersion: '4',
        cryptoMd5Method: (data) => {
            return AWS.util.crypto.md5(data, 'base64')
        },
        cryptoHexEncodedHash256: (data) => {
            return AWS.util.crypto.sha256(data, 'hex')
        },
        signHeaders: {
            'authorization': `Bearer ${token}`
        }
    }

but still get this error Failed to execute 'setRequestHeader' on 'XMLHttpRequest': 'AWS4-HMAC-SHA256 Credential=.../s3/aws4_request, SignedHeaders=host;x-amz-date Is there chance that nuxt overwrites request headers somehow? Or something else? Maybe i need to create plugin as a global instance? Anyone can help?

@pi0 @Atinux @alexchopin

This question is available on Nuxt.js community (#c2310)