File tree 2 files changed +6
-1
lines changed
src/components/public/news
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,11 @@ const app = new Koa()
283
283
const total = end . microseconds + ( end . milliseconds * 1e3 ) + ( end . seconds * 1e6 ) ;
284
284
ctx . set ( 'Response-Time' , `${ total / 1e3 } ms` ) ;
285
285
} )
286
+
287
+ . use ( async ( ctx , next ) => {
288
+ await next ( ) ;
289
+ ctx . set ( 'Access-Control-Allow-Origin' , '*' ) ;
290
+ } )
286
291
287
292
// Create a new Apollo client and Redux store per request. This will be
288
293
// stored on the `ctx` object, making it available for the React handler or
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class News extends React.Component {
16
16
}
17
17
18
18
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 ) => {
20
20
if ( err ) return console . log ( err ) ;
21
21
this . setState ( { items : rss . items } ) ;
22
22
} ) ;
You can’t perform that action at this time.
0 commit comments