Spaces:
Sleeping
Sleeping
File size: 277 Bytes
6ee917b | 1 2 3 4 5 6 7 8 9 10 11 12 | import Vapor
struct WebsiteController: RouteCollection {
func boot(routes: RoutesBuilder) throws {
routes.get("robots.txt", use: robotsTxtHandler)
}
func robotsTxtHandler(_ req: Request) -> String {
return "User-agent: *\nDisallow: /"
}
}
|