Skip to content

Commit

Permalink
fix static files rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
D-GopalKrishna committed Jan 23, 2024
1 parent 5c75b98 commit fdfc5e8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions applications/workspaces/server/workspaces/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ def setup_static_router(app):
# remove the static route (if exists)
app.url_map._rules_by_endpoint["static"] = []
# add / as static route
app.add_url_rule(f"/<path:filename>", endpoint="static", view_func=app.send_static_file)

app.add_url_rule(f"/<path:filename>", view_func=app.send_static_file)

def init_app(app):
cors = CORS(app, resources={r"/api/*": {"origins": "*"}})
Expand All @@ -56,7 +55,7 @@ def init_app(app):
"Could not start kafka consumers. Some application functionality won't be available.", exc_info=True
)
mkdirs()
# setup_static_router(app)
setup_static_router(app)
app.template_folder = Config.TEMPLATE_DIR


Expand All @@ -70,7 +69,6 @@ def init_app(app):




if __name__ == "__main__":
cloudharness.set_debug()
main()

0 comments on commit fdfc5e8

Please sign in to comment.