Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CORS headers to index URL used in URL check. #268

Merged
merged 4 commits into from
Jun 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions daliuge-engine/dlg/manager/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,12 @@ def getNodeGraphStatus(self, node, sessionId):
# ===========================================================================
# non-REST methods
# ===========================================================================

@daliuge_aware
myxie marked this conversation as resolved.
Show resolved Hide resolved
def visualizeDIM(self):
"""
Note: this is marked as 'daliuge_aware' in order to get the CORS headers.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Clarify the purpose of the note in the docstring.

The note in the docstring is useful, but it might be clearer if it specifies why CORS headers are necessary for this method. For example, is it because this method is expected to be called from a web client?

Suggested change
Note: this is marked as 'daliuge_aware' in order to get the CORS headers.
Note: this is marked as 'daliuge_aware' in order to get the CORS headers.
This is necessary because this method is expected to be called from a web client.

"""
tpl = file_as_string("web/dim.html")
urlparts = bottle.request.urlparts
selectedNode = (
Expand Down
Loading