Fixed a configuration issue with the news service
Turns out traefik handles port routing, so the project doesn't need to know the news services' port.
This commit is contained in:
@@ -6,7 +6,13 @@ const NewsFeed = props => {
|
||||
const [articles, setArticles] = useState(null);
|
||||
|
||||
if (!articles) {
|
||||
fetch(props.uri, { method: 'GET' })
|
||||
fetch(props.uri, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
},
|
||||
})
|
||||
.then(a => {
|
||||
if (!a.ok) {
|
||||
throw `Network error ${a.status}: ${a.statusText} ${a.url}`;
|
||||
@@ -39,4 +45,4 @@ const NewsFeed = props => {
|
||||
);
|
||||
};
|
||||
|
||||
export default NewsFeed;
|
||||
export default NewsFeed;
|
||||
|
||||
Reference in New Issue
Block a user