boofuzz icon indicating copy to clipboard operation
boofuzz copied to clipboard

[FEATURE] add prefix for app

Open skapin opened this issue 1 year ago • 6 comments

Hi, I patched the application to handle a PREFIX when the app is deployed on wbeserver like :

myserver.com/subpath/foobuzz/

I had to:

  • use url_for everywhere
  • prefix all route
  • add prefix on app start for static path

Prefix is loaded from FLASK_APP_PREFIX env. This is the quickest way. The clean way is to use blueprint and propre web server starting

skapin avatar Feb 14 '24 17:02 skapin

I have passed black, you can retrigger

skapin avatar Feb 15 '24 13:02 skapin

Very cool @skapin ! Have you functional tested both with and without the prefix?

jtpereyda avatar Feb 15 '24 18:02 jtpereyda

Docs build is failing -- not sure if that is new or existing.

jtpereyda avatar Feb 15 '24 20:02 jtpereyda

i didnt touch any doc. why should I need ?

For tests, it would be good if someone test it too, especially since i'm not the user using boofuzz, I made the change for someone. Because of this, I tested one usecase only.

skapin avatar Feb 16 '24 09:02 skapin

Regarding the failing docs build, it's just a link-check that returns 403 Forbidden. Would ignore that for this PR and I'll look into this separately. Maybe Stackoverflow has blocked robot requests coming from GitHub CI server or so.

SR4ven avatar Feb 16 '24 11:02 SR4ven

@skapin Are you saying you tested it FLASK_APP_PREFIX but did not test it without?

jtpereyda avatar Feb 16 '24 15:02 jtpereyda

Ignoring the docs issue as it's separate. Merging. Thanks @skapin @SR4ven !

jtpereyda avatar Feb 19 '24 16:02 jtpereyda