Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol. wisp.place
86
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix directory hits having / removed

+17 -2
+2 -1
apps/hosting-service/src/server.ts
··· 51 51 const hostname = c.req.header('host') || ''; 52 52 const hostnameWithoutPort = hostname.split(':')[0] || ''; 53 53 const rawPath = url.pathname.replace(/^\//, ''); 54 - const path = sanitizePath(rawPath); 54 + const hasTrailingSlash = rawPath.endsWith('/'); 55 + const path = hasTrailingSlash ? sanitizePath(rawPath) + '/' : sanitizePath(rawPath); 55 56 56 57 logger.debug(`Request: host=${hostname} hostnameWithoutPort=${hostnameWithoutPort} path=${path}`, { BASE_HOST }); 57 58
+15 -1
apps/main-app/src/routes/domain.ts
··· 327 327 throw new Error('Domain parameter required'); 328 328 } 329 329 330 + // Verify domain belongs to user 331 + const domainLower = normalizeDomain(domain); 332 + const info = await isDomainRegistered(domainLower); 333 + 334 + if (!info.registered || info.type !== 'wisp') { 335 + set.status = 404 336 + throw new Error('Domain not found'); 337 + } 338 + 339 + if (info.did !== auth.did) { 340 + set.status = 403 341 + throw new Error('Unauthorized: You do not own this domain'); 342 + } 343 + 330 344 // Update wisp.place domain to point to this site 331 - await updateWispDomainSite(domain, siteRkey); 345 + await updateWispDomainSite(domainLower, siteRkey); 332 346 333 347 return { success: true }; 334 348 } catch (err) {