ak146 / FunnyBlog2.0

personal blog for AP CSP
MIT License
1 stars 0 forks source link

debugging 😱 #10

Open ak146 opened 6 months ago

ak146 commented 6 months ago

image

At the start of my cookie clicker I was getting a cors issue. Issue It wasn't returning an access header despite me checking all my backend code correctly.

Here are the response headers during this error.

image

Here is what the response headers should look like.

image

I first double checked all my post put and get were working in postman. Then I tried to debug the front and back end.

image image image

In order to find the error, I placed breakpoints on my front end and backend to check where the code was failing.

image

After stepping through the front end code, I stepped into the backend methods. I set breakpoints in the CRUD and User.py classes.

image image image

Here are the response headers. The access headers are now defined and this solves the CORS issue.

image

Here is the updated payload.

image image
jm1021 commented 6 months ago

Text to describe steps or what I am looking at is entirely required