-
Notifications
You must be signed in to change notification settings - Fork 387
Open
Description
Summary
The AngularJS frontend is still hard-coded to call https://conduit.productionready.io/api. That host now returns a 307 redirect to https://api.realworld.io/api, which then fails with Cloudflare DNS errors, so all API calls from the app end up blocked by CORS or return 5xx responses.
Steps to Reproduce
- Clone the repo and install dependencies (
npm install). - Run
gulp(Node 10.24.1 via nvm). - Open
http://localhost:4000and watch the network console.
Current Behavior
- Requests for
/articlesand/tagsredirect to the defunctapi.realworld.ioorigin and fail withAccess-Control-Allow-Originmissing, yieldingstatus: -1in Angular. - The home feed stays in the loading state and login/logout flows are unreliable because the API never returns data.
- The failing responses bubble up as
Possibly unhandled rejectionerrors in the console. When the redirect does succeed, the backend responds withoffset=NaN, leading to a 500 "Internal Server Error".
Expected Behavior
The frontend should point to the active RealWorld demo API so data loads normally and authentication continues to work.
Proposed Fix
- Update
src/js/config/app.constants.jsto usehttps://api.realworld.show/api, which is the backend referenced in the main RealWorld README. - Refresh the README section that mentions the live API host so new users start from the correct URL.
- Guard the pagination component so it always computes a numeric
limit/offsetbefore issuing requests; this preventsoffset=NaNqueries that the new backend rejects with 500s.
With those changes applied locally, the home page loads articles and tags without CORS errors, and other core flows (login, favorites, editing) work again.
Metadata
Metadata
Assignees
Labels
No labels