Coder Social home page Coder Social logo

@htmx_only decorator about django-htmx HOT 3 CLOSED

adamchainz avatar adamchainz commented on July 24, 2024 2
@htmx_only decorator

from django-htmx.

Comments (3)

bittner avatar bittner commented on July 24, 2024 1

It doesn't offer any security or UX improvements.

Interesting. I would have said the opposite is an obvious conclusion. Agreed, w.r.t. application security, blocking unwanted calls doesn't close holes in a vulnerable application, but it makes the implementation cleaner when we allow intended use only. Also imagine URLs indexed by a search engine: People landing there are certainly not amused.

loading up a fragment URL can be useful, at least for debugging with webdev tools or django-debug-toolbar

@valberg suggested to allow loading a fragment when DEBUG=True in #205 (comment). I feel that might be a good idea.

from django-htmx.

adamchainz avatar adamchainz commented on July 24, 2024

The idea was already rejected in #205.

I don't really like blocking requests simply because they didn't set the magic htmx header. It doesn't offer any security or UX improvements. Plus loading up a fragment URL can be useful, at least for debugging with webdev tools or django-debug-toolbar.

from django-htmx.

adamchainz avatar adamchainz commented on July 24, 2024

You're always free to implement such a decorator in your projects. I remain unconvinced to add one to this package.

from django-htmx.

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.