mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
deploiement: reverse proxy nginx pour rediriger les requetes au front ou back suivant url
This commit is contained in:
@@ -12,8 +12,13 @@ export default function TeamEdit({ selectedTeamId, setSelectedTeamId }) {
|
||||
const teamImage = useRef(null);
|
||||
const [newTeamName, setNewTeamName] = React.useState('');
|
||||
const { updateTeam, getTeamName, removeTeam, getTeam, teams } = useAdmin();
|
||||
const [team, setTeam] = useState({})
|
||||
const SERVER_URL = "https://" + process.env.NEXT_PUBLIC_SOCKET_HOST + ":" + process.env.NEXT_PUBLIC_SOCKET_PORT;
|
||||
const [team, setTeam] = useState({});
|
||||
var protocol = "https://";
|
||||
if (process.env.NEXT_PUBLIC_SOCKET_HOST == "localhost") {
|
||||
protocol = "http://";
|
||||
}
|
||||
const SERVER_URL = protocol + process.env.NEXT_PUBLIC_SOCKET_HOST + "/back";
|
||||
console.log(SERVER_URL);
|
||||
|
||||
useEffect(() => {
|
||||
let team = getTeam(selectedTeamId);
|
||||
|
||||
@@ -17,7 +17,12 @@ export function EnemyTeamModal({ visible, onClose }) {
|
||||
imageRef.current.src = SERVER_URL + "/photo/enemy?team=" + teamId.toString() + "&t=" + new Date().getTime();
|
||||
}
|
||||
|
||||
const SERVER_URL = "https://" + process.env.NEXT_PUBLIC_SOCKET_HOST + ":" + process.env.NEXT_PUBLIC_SOCKET_PORT;
|
||||
var protocol = "https://";
|
||||
if (process.env.NEXT_PUBLIC_SOCKET_HOST == "localhost") {
|
||||
protocol = "http://";
|
||||
}
|
||||
const SERVER_URL = protocol + process.env.NEXT_PUBLIC_SOCKET_HOST + "/back";
|
||||
console.log(SERVER_URL);
|
||||
return (visible &&
|
||||
<>
|
||||
<div className='fixed w-screen h-screen bg-black bg-opacity-50 z-10 text-center'></div>
|
||||
|
||||
@@ -8,7 +8,12 @@ export function WaitingScreen() {
|
||||
const { name, teamId } = useGame();
|
||||
const { gameSettings } = useTeamContext();
|
||||
const imageRef = useRef(null);
|
||||
const SERVER_URL = "https://" + process.env.NEXT_PUBLIC_SOCKET_HOST + ":" + process.env.NEXT_PUBLIC_SOCKET_PORT;
|
||||
var protocol = "https://";
|
||||
if (process.env.NEXT_PUBLIC_SOCKET_HOST == "localhost") {
|
||||
protocol = "http://";
|
||||
}
|
||||
const SERVER_URL = protocol + process.env.NEXT_PUBLIC_SOCKET_HOST + "/back";
|
||||
console.log(SERVER_URL);
|
||||
|
||||
function sendImage() {
|
||||
let data = new FormData();
|
||||
|
||||
Reference in New Issue
Block a user