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

Fix issues related to CORS #29

Open
ackerhans opened this issue Nov 11, 2021 · 1 comment
Open

Fix issues related to CORS #29

ackerhans opened this issue Nov 11, 2021 · 1 comment

Comments

@ackerhans
Copy link

first of all, i love the idea of the project. thanks so much for making this :)

I cant seem to get past the cors policy blocker.

My setup:
agator runs on localhost:8888
apigator runs on localhost:3000
local pg instance runs on localhost:5432

in backend set up you say one needs to fill in the databaseURL in config.js
i did the following
'''
export const databaseConfig = {
'databaseURL': 'postgresql://apigator9999:apigator9999@localhost:5432/apigator9999_development'
};
''''

when trying to execute a request from the front end i get a CORS error. which seems to stem from the postgres server not allowing access from localhost:8888

i am a little lost, why i need to provide the pg db link to the front-end, if we have an api that should do that.

any help would be much appreciated.

@ackerhans
Copy link
Author

i figured it out.

the databasURL needs to be
'http://localhost:{port}

feel a bit stupid now :D

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

1 participant