Realtive URL fix

This commit is contained in:
James Pattinson
2025-12-10 10:10:13 +00:00
parent 39d5c2c9e2
commit 11f7390694
4 changed files with 34 additions and 32 deletions

View File

@@ -441,9 +441,18 @@
<!-- Success Notification -->
<div id="notification" class="notification"></div>
<script src="/config.js"></script>
<script>
// API base URL for iframe embedding
const API_BASE = 'https://ppr.swansea-airport.wales/api/v1';
// API base URL for iframe embedding - loaded from config.js or fallback
console.log('=== PPR Config Debug ===');
console.log('window.PPR_CONFIG:', window.PPR_CONFIG);
console.log('window.PPR_CONFIG.apiBase:', window.PPR_CONFIG?.apiBase);
const API_BASE = (window.PPR_CONFIG && window.PPR_CONFIG.apiBase) || '/api/v1';
console.log('Final API_BASE:', API_BASE);
console.log('Source:', window.PPR_CONFIG?.apiBase ? 'config.js' : 'fallback');
console.log('=======================');
// Iframe resizing functionality
function sendHeightToParent() {