Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refused to set unsafe header "Host" #356

Open
Kakukaho opened this issue Mar 17, 2022 · 4 comments
Open

Refused to set unsafe header "Host" #356

Kakukaho opened this issue Mar 17, 2022 · 4 comments

Comments

@Kakukaho
Copy link

final service = S3(
    region: getAWSRegion(),
    credentials: AwsClientCredentials(
      accessKey: getAWSAccessKey(),
      secretKey: getAWSSecretKey(),
    ),
);

await service.putObject(
    bucket: getAWSS3Bucket(),
    key: path,
    body: await file.readAsBytes(),
    contentType: 'application/octet-stream',
);
@Schwusch
Copy link
Collaborator

Not sure what you mean, what is the error message, and could it be related to #238?

@raphaelbarbosaqwerty
Copy link

Is related, I have the same problem here

@OlegShNayax
Copy link

@Schwusch I have the same problem in web

Screen Shot 2023-02-28 at 15 52 43

@isoos
Copy link
Contributor

isoos commented Feb 28, 2023

I believe that the browser has only limited http client support, and you may not add or change certain headers. Maybe with a proper CORS settings it would allow it, but I'm not that experienced in this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants