Skip to content

VIVO-4069 - Add javascript MIME type to ipretResults responses #4070

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gneissone
Copy link
Member

@gneissone gneissone commented Apr 16, 2025

VIVO GitHub issue: #4069

  • Other Relevant Links (Mailing list discussion, related pull requests, etc.)

What does this pull request do?

Sets the MIME type for a couple specific responses from the Ajax Visualization Controller which are formatted as javascript instead of plaintext or JSON.

What's new?

Functionality should remain the same, but you should be able to confirm the MIME type is set correctly by looking at the response in your developer console in the browser.
Screenshot 2025-04-16 at 16 54 43

How should this be tested?

Observe the Content-Type when making a call to http://localhost:8080/vivo/visualizationAjax?vis=capabilitymap&query=Virology&callback=ipretFullResults (You will need to replace the query with a valid concept in your VIVO database)
The Content-Type before the change will be "text/html"
The Content-Type after the change will be "text/javascript"

Note that application/javascript is also a valid MIME type for javascript, but apparently text/javascript has broader compatibility.

Additional Notes:

Interested parties

@VIVO-project/vivo-committers

Reviewers' expertise

Please add any new expertise in the list which might be needed for reviewing your PR or remove any of the listed if it is not needed.

Candidates for reviewing this PR should have some of the following expertises:

  1. Java
  2. JavaScript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant