Giter Site home page Giter Site logo

iFrame handling about v4w_website HOT 3 CLOSED

freerafiki avatar freerafiki commented on June 1, 2024
iFrame handling

from v4w_website.

Comments (3)

freerafiki avatar freerafiki commented on June 1, 2024

Solution:
Set a response header with X-Frame Options

Ci sono 3 opzioni:

  • DENY (nessuno può iframare)
  • SAMEORIGIN (solo noi da pagine di dequa)
  • ALLOW-FROM (lista di chi può iframarci)

Resources:

bisogna che capisca un po' meglio dove e come va inserito, sembrerebbe che nel routing una volta che siamo sulla creazione della pagina (calcolo strade ecc) possiamo fareresp = Flask.response() e là inserirgli resp.headers['Access-Control-Allow-Origin'] = 'ALLOW-FROM tatata', però non so se va fatto una volta per tutti, su ogni pagina, e soprattutto cosa fare con l'oggetto resp una volta settato l'header.
Un giorno con più calma me lo leggo, intanto scrivo qua così non mi dimentico

from v4w_website.

Lychfindel avatar Lychfindel commented on June 1, 2024

Ricommento quesa vecchia issue.
Qua la documentazione flask per settare x-frame-options: https://flask.palletsprojects.com/en/1.1.x/security/#x-frame-options
La mia proposta è di mettere per www.dequa.it il blocco degli iframe, e poi fare un routing apposito solo per gli iframe (tipo www.dequa.it/embed/etc) in cui fare anche un check di api_key per cui avere il controllo di chi può e chi non può includere la mappa sul sito. Ad esempio google utilizza come src per gli iframe questo formato: https://www.google.com/maps/embed/v1/place?key=API_KEY&q=Space+Needle,Seattle+WA

from v4w_website.

freerafiki avatar freerafiki commented on June 1, 2024

rimuovo, risolta nel nuovo frontend

from v4w_website.

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.