Skip to content
Open
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
23 changes: 20 additions & 3 deletions login.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ <h1>LEXECON</h1>
</button>
</form>

<div class="info-box">
<!-- Development credentials - only shown in development environment -->
<div id="devCredentials" class="info-box" style="display: none;">
<h3>β„Ή Development Credentials</h3>
<ul>
<li>admin / ChangeMe123!</li>
Expand All @@ -223,7 +224,23 @@ <h3>β„Ή Development Credentials</h3>
</div>

<script>
const API_BASE = 'http://localhost:8000';
// Environment configuration
// In production, window.LEXECON_ENV will be undefined or 'production'
// To enable dev mode, set: <script>window.LEXECON_ENV = 'development';</script> before this file
const ENV = window.LEXECON_ENV || 'production';
const IS_DEV = ENV === 'development' || window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1';

// API Base URL - environment aware
const API_BASE = window.LEXECON_API_BASE ||
(IS_DEV ? 'http://localhost:8000' : window.location.origin + '/api');

// Show development credentials only in development environment
if (IS_DEV) {
const devCredentials = document.getElementById('devCredentials');
if (devCredentials) {
devCredentials.style.display = 'block';
}
}

const loginForm = document.getElementById('loginForm');
const loginButton = document.getElementById('loginButton');
Expand Down Expand Up @@ -304,4 +321,4 @@ <h3>β„Ή Development Credentials</h3>
});
</script>
</body>
</html>
</html>
Loading