Code Monkey home page Code Monkey logo

Comments (3)

aperezdc avatar aperezdc commented on September 28, 2024

I understand that the use-case would be to be able to include README files as header/footer, but only if they exist, without letting the 404s end up being returned as part of the response. Is that right?

If that is the case, probably you want to use ngx_echo in combination with an internal subrequest location, and handle the 404 there instead (related: #17). The way I see this it, the resources pointed to by fancyindex_header and fancyindex_footer must always exist (otherwise it's is a configuration error), and if more complex logic than “always include those in the response” is needed, then one should script things using internal location subrequest.

from ngx-fancyindex.

PeterDaveHello avatar PeterDaveHello commented on September 28, 2024

Hi @aperezdc,

Thanks for your reply.

I understand that the use-case would be to be able to include README files as header/footer, but only if they exist, without letting the 404s end up being returned as part of the response. Is that right?

Sounds correct, my use-case is for ftp mirror hosting, some projects like Ubuntu will have header/footer, but some projects don't have that.

I'm not sure if using the ngx_echo will affect other normal access to header/footer, is it possible to let ngx-fancyindex hide the 404 without other configs?

from ngx-fancyindex.

aperezdc avatar aperezdc commented on September 28, 2024

Before deciding what to do about this issue, we need to figure out how using ngx_echo interacts with normal access to headers and footers.

from ngx-fancyindex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.