Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Default Robots.txt Handler #797

Closed
paganotoni opened this issue Dec 15, 2017 · 3 comments
Closed

Default Robots.txt Handler #797

paganotoni opened this issue Dec 15, 2017 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@paganotoni
Copy link
Member

One small addition to the buffalo framework that I would like to do is have the buffalo apps handle robots.txt by default.

How will this work

We will add a default robots handler to buffalo apps, what this handler will do is will render a file in robots.txt that is inside /assets/ folder.

If the file is not present it will render a permissive robots.txt content

User-agent: *
Disallow:

We should also allow developers to change this handler for any other, something like:

app.RobotsHandler = otherRobotHandler

What needs to change

  • Need to generate a default robots.txt inside assets folder.
  • Need to add a default robots.txt handler that will render the file from the assetsBox.
  • Need to add documentation of all this on gobuffalo.io
@paganotoni paganotoni self-assigned this Dec 15, 2017
@stanislas-m stanislas-m added documentation Improvements or additions to documentation enhancement New feature or request Proposal labels Dec 15, 2017
@u007
Copy link
Member

u007 commented Jan 9, 2018

would be better a way to render any files in public/ if it exists without the need to add prefix assets

and also anyway to off directory indexing for app.ServeFiles ?

@markbates
Copy link
Member

@paganotoni I like @u007 idea of allowing for the public directory to be served up easily. #853 addresses this.

@u007
Copy link
Member

u007 commented Jan 13, 2018

thank you :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants