mirror of
https://git.sr.ht/~cadence/NewLeaf
synced 2024-11-23 08:07:31 +00:00
Add robots.txt
This commit is contained in:
parent
0f877b06bc
commit
ccd3513c46
7
index.py
7
index.py
@ -1,5 +1,6 @@
|
||||
import cherrypy
|
||||
import json
|
||||
import pathlib
|
||||
import requests
|
||||
import youtube_dlc
|
||||
from extractors.video import extract_video
|
||||
@ -129,10 +130,14 @@ class NewLeaf(object):
|
||||
|
||||
bind_port = getattr(configuration, "bind_port", 3000)
|
||||
bind_host = getattr(configuration, "bind_host", "0.0.0.0")
|
||||
server_root = pathlib.Path(__file__).parent.joinpath("root")
|
||||
|
||||
cherrypy.config.update({"server.socket_port": bind_port, "server.socket_host": bind_host})
|
||||
cherrypy.quickstart(NewLeaf(), "/", {
|
||||
"/": {
|
||||
"tools.custom_headers.on": True
|
||||
"tools.custom_headers.on": True,
|
||||
"tools.staticdir.on": True,
|
||||
"tools.staticdir.dir": str(server_root.absolute()),
|
||||
"tools.staticdir.index": "index.html"
|
||||
}
|
||||
})
|
||||
|
2
root/robots.txt
Normal file
2
root/robots.txt
Normal file
@ -0,0 +1,2 @@
|
||||
User-Agent: *
|
||||
Disallow: /
|
Loading…
Reference in New Issue
Block a user