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:
@@ -9,7 +9,13 @@ const NewsEditor = props => {
|
|||||||
const [index, setIndex] = useState(null);
|
const [index, setIndex] = useState(null);
|
||||||
|
|
||||||
if (!articles) {
|
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 => {
|
.then(a => {
|
||||||
if (!a.ok) {
|
if (!a.ok) {
|
||||||
throw `Network error ${a.status}: ${a.statusText} ${a.url}`;
|
throw `Network error ${a.status}: ${a.statusText} ${a.url}`;
|
||||||
|
|||||||
@@ -6,7 +6,13 @@ const NewsFeed = props => {
|
|||||||
const [articles, setArticles] = useState(null);
|
const [articles, setArticles] = useState(null);
|
||||||
|
|
||||||
if (!articles) {
|
if (!articles) {
|
||||||
fetch(props.uri, { method: 'GET' })
|
fetch(props.uri, {
|
||||||
|
method: 'GET',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'Access-Control-Allow-Origin': '*'
|
||||||
|
},
|
||||||
|
})
|
||||||
.then(a => {
|
.then(a => {
|
||||||
if (!a.ok) {
|
if (!a.ok) {
|
||||||
throw `Network error ${a.status}: ${a.statusText} ${a.url}`;
|
throw `Network error ${a.status}: ${a.statusText} ${a.url}`;
|
||||||
|
|||||||
+1
-1
@@ -72,7 +72,7 @@ services:
|
|||||||
- DB_TIMEZONE=${databaseTimeZone}
|
- DB_TIMEZONE=${databaseTimeZone}
|
||||||
- SESSION_SECRET=secret
|
- SESSION_SECRET=secret
|
||||||
- SESSION_ADMIN=adminsecret
|
- SESSION_ADMIN=adminsecret
|
||||||
- NEWS_URI=http://${newsWebAddress}:3100/news
|
- NEWS_URI=https://${newsWebAddress}/news
|
||||||
- NEWS_KEY=${newsKey}
|
- NEWS_KEY=${newsKey}
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
|
|||||||
Reference in New Issue
Block a user