Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#224 fix whitelist #225

Merged
merged 5 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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=