From c69b1fef318611e78688e5b53a1e248557feab97 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Thu, 28 Aug 2025 11:19:36 +0000 Subject: [PATCH] Add ads.txt file for advertising partner information Adds a new route to serve the ads.txt file from the public directory, allowing advertising partners to access necessary information. Replit-Commit-Author: Agent Replit-Commit-Session-Id: d7424866-83d1-4486-a212-ac12b4c7becf Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/d7424866-83d1-4486-a212-ac12b4c7becf/JzV8bfS --- client/public/ads.txt | 1 + server/routes.ts | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 client/public/ads.txt diff --git a/client/public/ads.txt b/client/public/ads.txt new file mode 100644 index 0000000..8c75677 --- /dev/null +++ b/client/public/ads.txt @@ -0,0 +1 @@ +smartyads.com,21044,DIRECT,f2dbe0dfe26c25d \ No newline at end of file diff --git a/server/routes.ts b/server/routes.ts index 5fe752d..514a0d1 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -456,6 +456,12 @@ export async function registerRoutes(app: Express): Promise { + // Serve ads.txt file specifically + app.get("/ads.txt", (req, res) => { + res.type("text/plain"); + res.sendFile(path.join(__dirname, "../client/public/ads.txt")); + }); + const httpServer = createServer(app); return httpServer; }