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

Cors Error while Adding Blog #28

Open
ojasaklechayt opened this issue Oct 23, 2023 · 12 comments · May be fixed by #32
Open

Cors Error while Adding Blog #28

ojasaklechayt opened this issue Oct 23, 2023 · 12 comments · May be fixed by #32
Labels
bug Something isn't working hacktoberfest hacktoberfest hacktoberfest-accepted

Comments

@ojasaklechayt
Copy link
Owner

ojasaklechayt commented Oct 23, 2023

Checkout #24
While uploading the new blog, we are facing the cors error.
image

@ojasaklechayt ojasaklechayt added bug Something isn't working hacktoberfest hacktoberfest hacktoberfest-accepted labels Oct 23, 2023
@ojasaklechayt
Copy link
Owner Author

@aasimtaif guys while sending the post request, I am getting this errors. Can you please check because, since you have worked with this, you might have better idea with it.

@aasimtaif
Copy link
Contributor

sorry I do not understand the error
Desktop-1698084965639.webm
As you can see in video it is working perfectly fine

@aasimtaif
Copy link
Contributor

Checkout #24 While uploading the new blog, we are facing the cors error. image

When I tried this problem did not happen during blog upload but during the blog edit

@ojasaklechayt
Copy link
Owner Author

Checkout #24 While uploading the new blog, we are facing the cors error. image

When I tried this problem did not happen during blog upload but during the blog edit

This I feel is the cors error which comes when using external APIs. I have already added the cors property in the backend but don't know which it still is coming.

@aasimtaif
Copy link
Contributor

This happened to you during blog upload ??

@ojasaklechayt
Copy link
Owner Author

yep @aasimtaif I have also tried updating this code but this is still happening

@aasimtaif
Copy link
Contributor

aasimtaif commented Oct 23, 2023

It is not happening for me can you show the network tab to see response from backend

@ojasaklechayt
Copy link
Owner Author

It is not happening for me can you show the network tab to see response from backend

It give internal server error - 500 to me

@aasimtaif
Copy link
Contributor

Then I think it a backend problem
I will look into the issue first thing in the morning

@aasimtaif
Copy link
Contributor

aasimtaif commented Oct 24, 2023

the above error occurs when you try to upload a large size image
To resolve you have to increase the request size in the backend
If I try to upload an image size of 170kb it gives me an error

@ojasaklechayt
Copy link
Owner Author

the above error occurs when you try to upload a large size image To resolve you have to increase the request size in the backend If I try to upload an image size of 170kb it gives me an error

I see, can you make PR ? I will merge it.

@aasimtaif aasimtaif linked a pull request Oct 24, 2023 that will close this issue
@ojasaklechayt
Copy link
Owner Author

ojasaklechayt commented Oct 24, 2023

@aasimtaif Yes the code is working, actually the issue is that in the cors setting in the backend we have specified the frontend url and during the pr preview it uses different frontend url, hence giving the cors error. I feel it would be great if we can make the cors property general instread of specified for the main frontend url. Also I am closing the #32 pr since I have merged your latest pr, the changes of #32 pr is already been updated in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest hacktoberfest hacktoberfest-accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants