28 lines
629 B
Swift
28 lines
629 B
Swift
//
|
|
// Robots.swift
|
|
// IgniteSamples
|
|
// https://www.github.com/twostraws/Ignite
|
|
// See LICENSE for license information.
|
|
//
|
|
|
|
import Foundation
|
|
import Ignite
|
|
|
|
/// An example custom robots.txt configuration file, blocking certain paths
|
|
/// from Google and Bing, and everything from ChatGPT.
|
|
struct Robots: RobotsConfiguration {
|
|
var disallowRules: [DisallowRule]
|
|
|
|
init() {
|
|
let paths = [
|
|
"/wp-admin"
|
|
]
|
|
|
|
disallowRules = [
|
|
DisallowRule(robot: .google, paths: paths),
|
|
DisallowRule(robot: .bing, paths: paths),
|
|
DisallowRule(robot: .chatGPT)
|
|
]
|
|
}
|
|
}
|