Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/bug/Avaiga#1592-graph-visualizat…
Browse files Browse the repository at this point in the history
…ion' into bug/Avaiga#1592-graph-visualization
  • Loading branch information
satyyam11 committed Oct 13, 2024
2 parents 4d56421 + 06bdd55 commit ab5168e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions taipy/gui/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@
from importlib import util
from random import choices, randint

from flask import Blueprint, Flask, json, jsonify, render_template, request, send_from_directory
from flask import (
Blueprint,
Flask,
json,
jsonify,
make_response,
render_template,
request,
send_from_directory,
)
from flask_cors import CORS
from flask_socketio import SocketIO
from gitignore_parser import parse_gitignore
Expand Down Expand Up @@ -160,7 +169,13 @@ def my_index(path):
if resource_handler_id is not None:
resource_handler = _ExternalResourceHandlerManager().get(resource_handler_id)
if resource_handler is None:
return (f"Invalid value for query {_Server._RESOURCE_HANDLER_ARG}", 404)
response = make_response(
"Cookie was deleted due to invalid resource handler id. Please restart the page manually.", 400
)
response.set_cookie(
_Server._RESOURCE_HANDLER_ARG, "", secure=request.is_secure, httponly=True, expires=0, path="/"
)
return response
try:
return resource_handler.get_resources(path, static_folder, base_url)
except Exception as e:
Expand Down

0 comments on commit ab5168e

Please sign in to comment.