Windsurf storage

Signed URLs Expiring Too Fast in Windsurf App

Images, documents, and file download links in your Windsurf-generated app break after a short time. Users see broken images, get access denied errors when clicking download links, or see files that loaded fine moments ago now showing 403 Forbidden errors.

This happens because your app uses signed URLs to serve files from private cloud storage (Supabase Storage, S3, or GCS), and the URLs expire too quickly. Cascade may have set a very short expiration time, or the URLs are being generated once and cached while the expiration passes.

The issue is especially frustrating for users because everything appears to work initially, then breaks silently. Pages that worked fine a few minutes ago suddenly show broken images everywhere.

Error Messages You Might See

403 Forbidden: Request has expired AccessDenied: Request has expired The provided token has expired SignatureDoesNotMatch Error: URL signature expired
403 Forbidden: Request has expiredAccessDenied: Request has expiredThe provided token has expiredSignatureDoesNotMatchError: URL signature expired

Common Causes

  • Default short expiration — Cascade used the default signed URL expiration (often 60 seconds) without increasing it for the use case
  • URLs cached but not refreshed — Signed URLs are generated once at page load and stored in state, but not regenerated when they expire
  • Server-side rendering with stale URLs — URLs generated during SSR are already partially expired by the time the client receives them
  • Email or notification links — Signed URLs sent in emails expire before the recipient opens the message
  • CDN caching conflicts — A CDN caches the page with signed URLs, but the URLs expire before the CDN cache does

How to Fix It

  1. Increase signed URL expiration — Set expiration to match your use case: 1 hour for page views, 24 hours for download links, 7 days for email links
  2. Implement URL refresh logic — Create a client-side mechanism that regenerates signed URLs before they expire, or on 403 errors
  3. Use public buckets for non-sensitive files — If the files aren't private (like product images), make the bucket public and skip signed URLs entirely
  4. Add a redirect endpoint — For email links, create a permanent URL (/files/:id/download) that generates a fresh signed URL and redirects
  5. Set CDN cache to match URL expiration — Ensure CDN cache-control headers expire before the signed URLs they contain

Real developers can help you.

Sage Fulcher Sage Fulcher Hey I'm Sage! Im a Boston area software engineer who grew up in South Florida. Ive worked at a ton of cool places like a telehealth kidney care startup that took part in a billion dollar merger (Cricket health/Interwell health), a boutique design agency where I got to work on a ton of exciting startups including a photography education app, a collegiate Esports league and more (Philosophie), a data analytics as a service startup in Cambridge (MA) as well as at Phillips and MIT Lincoln Lab where I designed and developed novel network security visualizations and analytics. I've been writing code and furiously devoted to using computers to make people’s lives easier for about 17 years. My degree is in making computers make pretty lights and sounds. Outside of work I love hip hop, the Celtics, professional wrestling, magic the gathering, photography, drumming, and guitars (both making and playing them) Milan Surelia Milan Surelia Milan Surelia is a Mobile App Developer with 5+ years of experience crafting scalable, cross-platform apps at 7Span and Meticha. At 7Span, he engineers feature-rich Flutter apps with smooth performance and modern UI. As the Co-Founder of Meticha, he builds open-source tools and developer-focused products that solve real-world problems. Expertise: 💡 Developing cross-platform apps using Flutter, Dart, and Jetpack Compose for Android, iOS, and Web. 🖋️ Sharing insights through technical writing, blogging, and open-source contributions. 🤝 Collaborating closely with designers, PMs, and developers to build seamless mobile experiences. Notable Achievements: 🎯 Revamped the Vepaar app into Vepaar Store & CRM with a 2x performance boost and smoother UX. 🚀 Launched Compose101 — a Jetpack Compose starter kit to speed up Android development. 🌟 Open source contributions on Github & StackOverflow for Flutter & Dart 🎖️ Worked on improving app performance and user experience with smart solutions. Milan is always happy to connect, work on new ideas, and explore the latest in technology. Nam Tran Nam Tran 10 years as fullstack developer Yovel Cohen Yovel Cohen I got a lot of experience in building Long-horizon AI Agents in production, Backend apps that scale to millions of users and frontend knowledge as well. Basel Issmail Basel Issmail ’m a Senior Full-Stack Developer and Tech Lead with experience designing and building scalable web platforms. I work across the full development lifecycle, from translating business requirements into technical architecture to delivering reliable production systems. My work focuses on modern web technologies, including TypeScript, Angular, Node.js, and cloud-based architectures. I enjoy solving complex technical problems and helping teams turn product ideas and prototypes into working platforms that can grow and scale. In addition to development, I often collaborate closely with product managers, business analysts, designers, and QA teams to ensure that solutions align with both technical and business goals. I enjoy working with startups and product teams where I can contribute both as a hands-on engineer and as a technical partner in designing and delivering impactful software. Pratik Pratik SWE with 15+ years of experience building and maintaining web apps and extensive BE infrastructure Jaime Orts-Caroff Jaime Orts-Caroff I'm a Senior Android developer, currently working at Aircall. I'm open to work in various fields! Anthony Akpan Anthony Akpan Developer with 8 years of experience building softwares fro startups Franck Plazanet Franck Plazanet I am a Strategic Engineering Leader with over 8 years of experience building high-availability enterprise systems and scaling high-performing technical teams. My focus is on bridging the gap between complex technology and business growth. Core Expertise: 🚀 Leadership: Managing and coaching teams of 15+ engineers, fostering a culture of accountability and continuous improvement. 🏗️ Architecture: Enterprise Core Systems, Multi-system Integration (ERP/API/ETL), and Core Database Structure. ☁️ Cloud & Scale: AWS Expert; architected systems handling 10B+ monthly requests and managing 100k+ SKUs. 📈 Business Impact: Aligning tech strategy with P&L goals to drive $70k+ in monthly recurring revenue. I thrive on "out-of-the-box" thinking to solve complex technical bottlenecks and am always looking for ways to use automation to improve business productivity. Caio Rodrigues Caio Rodrigues I'm a full-stack developer focused on building practical and scalable web applications. My main experience is with **React, TypeScript, and modern frontend architectures**, where I prioritize clean code, component reusability, and maintainable project structures. I have strong experience working with **dynamic forms, state management (Redux / React Hook Form), and complex data-driven interfaces**. I enjoy solving real-world problems by turning ideas into reliable software that companies can actually use in their daily operations. Beyond coding, I care about **software quality and architecture**, following best practices for componentization, code organization, and performance optimization. I'm also comfortable working across the stack when needed, integrating APIs, handling business logic, and helping transform prototypes into production-ready systems. My goal is always to deliver solutions that are **simple, efficient, and genuinely useful for the people using them.**

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Frequently Asked Questions

How long should I set signed URL expiration?

It depends on the use case. For images displayed on pages: 1-4 hours. For download links: 24 hours. For links in emails: 7 days. For public content that doesn't need access control, skip signed URLs and use public buckets.

Can signed URLs be extended after they are created?

No. Once a signed URL is generated, its expiration is fixed. You must generate a new signed URL. Design your app to either refresh URLs before expiry or use a redirect endpoint that generates fresh URLs on demand.

Related Windsurf Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help