Skip to content

Commit

Permalink
Merge pull request #225 from ita-social-projects/#224FixWhitelist
Browse files Browse the repository at this point in the history
#224 fix whitelist
  • Loading branch information
BelousSofiya authored Sep 25, 2023
2 parents f74dad6 + 6376aa4 commit 5ae23f7
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/venv
/.venv
/.env
/*/.env
/.DS_Store
__pycache__/
/FrontEnd/node_modules
23 changes: 19 additions & 4 deletions FrontEnd/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions FrontEnd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"dotenv": "^16.3.1"
}
}
1 change: 1 addition & 0 deletions FrontEnd/sample.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_API_URL=
5 changes: 2 additions & 3 deletions FrontEnd/src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react';
import './App.css';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import AdminPage from "./components/adminPage/AdminPage";
import BasicPage from "./components/basicPage/BasicPage";

import AdminPage from './components/adminPage/AdminPage';
import BasicPage from './components/basicPage/BasicPage';

function App() {
return (
Expand Down
5 changes: 3 additions & 2 deletions forum/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@
CORS_ALLOW_ALL_ORIGINS = False

CORS_ORIGIN_WHITELIST = [
'http://localhost:3000',
'http://localhost',
'http://127.0.0.1',
'http://0.0.0.0',
config('CORS_ORIGIN_WHITELIST'),
]

CORS_ALLOWED_ORIGINS = [
'http://localhost:3000',
'http://localhost',
'http://127.0.0.1',
'http://0.0.0.0',
]
Expand Down
5 changes: 5 additions & 0 deletions sample.env
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#db details
SECRET_KEY=
PG_DB=
PG_USER=
PG_PASSWORD=
DB_HOST=
DB_PORT=

#SMTP
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=
EMAIL_PORT=
EMAIL_USE_TLS=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=

#origin hostnames allowed to make cross-site HTTP requests
CORS_ORIGIN_WHITELIST=

0 comments on commit 5ae23f7

Please sign in to comment.