Skip to content

Commit 5361b52

Browse files
committed
Fix loading of Medium News items
1 parent ba1dd62 commit 5361b52

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

kit/entry/server.js

+5
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ const app = new Koa()
283283
const total = end.microseconds + (end.milliseconds * 1e3) + (end.seconds * 1e6);
284284
ctx.set('Response-Time', `${total / 1e3}ms`);
285285
})
286+
287+
.use(async (ctx, next) => {
288+
await next();
289+
ctx.set('Access-Control-Allow-Origin', '*');
290+
})
286291

287292
// Create a new Apollo client and Redux store per request. This will be
288293
// stored on the `ctx` object, making it available for the React handler or

src/components/public/news/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class News extends React.Component {
1616
}
1717

1818
componentDidMount() {
19-
Feed.load('https://cors-anywhere.herokuapp.com/https://medium.com/feed/@camerakit', (err, rss) => {
19+
Feed.load('https://cors-anywhere.herokuapp.com/https://medium.com/feed/camerakit', (err, rss) => {
2020
if (err) return console.log(err);
2121
this.setState({ items: rss.items });
2222
});

0 commit comments

Comments
 (0)