Giter VIP home page Giter VIP logo

Comments (12)

taydy avatar taydy commented on July 28, 2024 3

hi, Did you set the -cors parameter when starting local dynamodb?

-cors value — Enables support for cross-origin resource sharing (CORS) for JavaScript. You must provide a comma-separated "allow" list of specific domains. The default setting for -cors is an asterisk (*), which allows public access.

you can run
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb to set core *,
or run
java -Djava.l ibrary.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb -cors http://localhost:8080

from dynamodb-manager.

timothyjeffcoat avatar timothyjeffcoat commented on July 28, 2024 3

Another way to overcome CORS trouble is to set the environment variable like the following in the compose.yml of localstack

environment:
- DISABLE_CORS_CHECKS=1

from dynamodb-manager.

taydy avatar taydy commented on July 28, 2024

Please let me know if your problem has been resolved.

from dynamodb-manager.

shashikantkulkarni avatar shashikantkulkarni commented on July 28, 2024

from dynamodb-manager.

shashikantkulkarni avatar shashikantkulkarni commented on July 28, 2024

Hello,
It is working as per your suggestion. Thank you.
Can you please add it in your documentation so it will help others if they face this issue.

You can close this issue.

Thanks once again.

from dynamodb-manager.

taydy avatar taydy commented on July 28, 2024

Very happy to help you

from dynamodb-manager.

First-Met avatar First-Met commented on July 28, 2024

hi how to reslove this issue? thanks
I have set the Param "- cors ",but didn't resloved.
java -jar DynamoDBLocal.jar -sharedDb -cors '
' -dbPath ./data -port 8001
Port: 8001
InMemory: false
DbPath: ./data
SharedDb: true
shouldDelayTransientStatuses: false
CorsParams: *

image

from dynamodb-manager.

ArchanaNeog avatar ArchanaNeog commented on July 28, 2024

Cors setup in local DynamoDB running in docker
We can set the cors while running the docker instance as shown below
docker run --name dynamodb -p 8000:8000 amazon/dynamodb-local -jar DynamoDBLocal.jar -cors http://localhost:8080

Initializing DynamoDB Local with the following configuration:
Port: 8000
InMemory: false
DbPath: null
SharedDb: false
shouldDelayTransientStatuses: false
CorsParams: http://localhost:8080

from dynamodb-manager.

Stephen0910 avatar Stephen0910 commented on July 28, 2024

Is there any other way to solve the problem?
dynamodb is not deployed by me, so I can't change its parameters
Also, it seems that the 2.x version of dynamodb doesn't work even after changing it
Is it possible to access dynamodb without changing its environment parameters, but only changing the content of the project?
Best wishes.

from dynamodb-manager.

Stephen0910 avatar Stephen0910 commented on July 28, 2024

Is there any other way to solve the problem? dynamodb is not deployed by me, so I can't change its parameters Also, it seems that the 2.x version of dynamodb doesn't work even after changing it Is it possible to access dynamodb without changing its environment parameters, but only changing the content of the project? Best wishes.

by the way, I can directly connect the dynamodb server by cmd: aws dynamodb get-item --table-name...
So I think this is a bug should be fixed in dynamodb-manager.

from dynamodb-manager.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.