Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gamer-1478 committed Apr 3, 2022
1 parent 88550cc commit 4050c01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion react-app/src/Components/reuse/Misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const urlPrefix = () => {
return "http://localhost:3200/"
}
else {
return window.location.origin + "/";
return "https://ts-prog1.herokuapp.com/";
}
};

Expand Down
4 changes: 2 additions & 2 deletions routers/bloat.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ bloat_router.use(express.static('public'));
bloat_router.use(express.static('react-app/build'));

//cors middleware
const whitelist = ['ts-prog1.herokuapp.com', 'localhost'];
const whitelist = ['ts-prog1.herokuapp.com', 'localhost', 'netlify.app', 'techsyndicate.us'];
const corsOptions = {
origin: (origin, callback) => {
if (origin) {
Expand Down Expand Up @@ -40,7 +40,7 @@ const corsOptions = {
bloat_router.use(cors(corsOptions))

// Allowed hosts
const allowedHosts = ['localhost', 'herokuapp.com'];
const allowedHosts = whitelist;
const checkHosts = (req, res, next) => {
for (i in allowedHosts) {
if (req.hostname.includes(allowedHosts[i])) {
Expand Down

0 comments on commit 4050c01

Please sign in to comment.