-
Notifications
You must be signed in to change notification settings - Fork 384
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:4000
and watch the network console.
Current Behavior
- Requests for
/articles
and/tags
redirect to the defunctapi.realworld.io
origin and fail withAccess-Control-Allow-Origin
missing, yieldingstatus: -1
in 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 rejection
errors 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.js
to 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
/offset
before issuing requests; this preventsoffset=NaN
queries 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