Skip to content

Commit

Permalink
Remove robots.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasstrehle committed Feb 10, 2025
1 parent bc47b17 commit 2ec44a5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions src/app/frontend-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ export class FrontendManager extends HTMLProvider {
// handled default web paths
this.server.path("/", (req, path, con, metadata)=>this.handleRequest(req, path, con, metadata));
this.server.path("/favicon.ico", (req, path)=>this.handleFavicon(req, path));
this.server.path("/robots.txt", (req, path)=>this.handleRobotsTXT(req, path));

this.server.path(/^\/@uix\/cache\/.*$/, async (req, path)=>{
await req.respondWith(await serveDir!(req.request, {fsRoot:UIX.cacheDir.normal_pathname, urlRoot:'@uix/cache/', enableCors:true, quiet:true}))
Expand Down Expand Up @@ -1092,15 +1091,6 @@ if (!globalThis.location.origin.endsWith(".unyt.app")) {
}
}

private async handleRobotsTXT(requestEvent: Deno.RequestEvent, _path:string) {
try {
await this.server.serveContent(requestEvent, "text/plain", "User-agent: *\nAllow: /");
} catch (e) {
console.log(e)
await this.server.sendError(requestEvent, 500);
}
}

#manifest?: Record<string, any>;

private generateManifest() {
Expand Down
2 changes: 1 addition & 1 deletion src/uix-dom
Submodule uix-dom updated 1 files
+4 −3 attributes.ts

0 comments on commit 2ec44a5

Please sign in to comment.