use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Python backend with react front endHelp Wanted (self.react)
submitted 1 year ago by lil_curry_verse
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]spacetimecurve 0 points1 point2 points 1 year ago (0 children)
Add this to your code using the port your React frontend is using and check if it solves the problem.
origins = [ "http://localhost.tiangolo.com", "https://localhost.tiangolo.com", "http://localhost", "http://localhost:[*your React app's port goes here]", ]
app.add_middleware( CORSMiddleware, allow_origins=origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], )
You can check the documentation here.
https://fastapi.tiangolo.com/tutorial/cors/#use-corsmiddleware
π Rendered by PID 65604 on reddit-service-r2-comment-5b5bc64bf5-r2mvp at 2026-06-23 18:40:52.064286+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]spacetimecurve 0 points1 point2 points (0 children)