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
This commit is contained in:
sebastjanartic 2025-08-28 11:19:36 +00:00
parent c2a3ce12eb
commit c69b1fef31
2 changed files with 7 additions and 0 deletions

1
client/public/ads.txt Normal file
View File

@ -0,0 +1 @@
smartyads.com,21044,DIRECT,f2dbe0dfe26c25d

View File

@ -456,6 +456,12 @@ export async function registerRoutes(app: Express): Promise<Server> {
// 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;
}