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:
2021-02-07 03:36:19 +00:00
parent 664e169796
commit 1aa047c3d9
3 changed files with 17 additions and 5 deletions
+7 -1
View File
@@ -9,7 +9,13 @@ const NewsEditor = props => {
const [index, setIndex] = useState(null);
if (!articles) {
fetch(`${props.uri}/titles?limit=999`, { method: 'GET' })
fetch(`${props.uri}/titles?limit=999`, {
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}`;
+7 -1
View File
@@ -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}`;
+1 -1
View File
@@ -72,7 +72,7 @@ services:
- DB_TIMEZONE=${databaseTimeZone}
- SESSION_SECRET=secret
- SESSION_ADMIN=adminsecret
- NEWS_URI=http://${newsWebAddress}:3100/news
- NEWS_URI=https://${newsWebAddress}/news
- NEWS_KEY=${newsKey}
networks:
- app-network