diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-22 10:09:07 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-22 10:09:07 -1000 |
| commit | 7fd381a242f68b7c6f10db4e3ae0bb3d06e36a16 (patch) | |
| tree | abff0af0a0f3b057d7b1ad6d95dbefdf30c553c3 /internal | |
| parent | 583f90c5dedf0235fa45557359b0e6e7dd62b0f0 (diff) | |
Fix background image CORS issue
Switch from Unsplash Source API to Lorem Picsum which has proper
CORS headers for cross-origin image loading.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/handlers/handlers.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 73a05f0..19415c7 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -78,9 +78,9 @@ func (h *Handler) HandleDashboard(w http.ResponseWriter, r *http.Request) { return } - // Generate random background URL (Unsplash Source API) - // Add timestamp to prevent caching - backgroundURL := fmt.Sprintf("https://source.unsplash.com/1920x1080/?landscape,nature&t=%d", time.Now().UnixNano()) + // Generate random background URL (Lorem Picsum - CORS-friendly) + // Add random seed to get different image each load + backgroundURL := fmt.Sprintf("https://picsum.photos/1920/1080?random=%d", time.Now().UnixNano()) // Wrap dashboard data with active tab for template data := struct { |
