MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / GET

Method GET

openlibrary/plugins/openlibrary/code.py:370–374  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

368 path = "/robots.txt"
369
370 def GET(self):
371 web.header("Content-Type", "text/plain")
372 is_dev = "dev" in infogami.config.features or web.ctx.host != "openlibrary.org"
373 robots_file = "norobots.txt" if is_dev else "robots.txt"
374 return web.ok(open(f"static/{robots_file}").read())
375
376
377@functools.cache

Callers

nothing calls this directly

Calls 1

readMethod · 0.80

Tested by

no test coverage detected