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

Improve viewer integration services detection #979

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

carla-at-wiris
Copy link
Contributor

Description

This pull request improves the way we detect whether the user is making use of the integration services or, in its absence, wiris.net.

Prior to the development, we used a hard-coded string to identify the route where the integration services were hosted. That is a correct approach for the PHP ones, but in Java the user can change their location, making it impossible to detect since it did not match the Java hard-coded string.

The approach is to make a request to the current viewer URL, if we are not on PHP and receive an answer, it means that the client is using the Java integration services. Otherwise, it will default to wiris.net.

Steps to reproduce

Case 1:

  1. Using Plugins, deploy a Java demo with the instructions in the build/docker folder.
  2. It should load properly the viewer from the location where the integration services are. Calls are not made to wiris.net, but to localhost.

Case 2:

  1. Build and start a viewer demo with the html-integrations.
  2. Check that the mentioned request to validate if we are in Java fails, and the following requests are made to wiris.net.

#taskid 45038

@carla-at-wiris carla-at-wiris added the type:bug Something isn't working label Jun 10, 2024
@carla-at-wiris carla-at-wiris self-assigned this Jun 10, 2024
@carla-at-wiris carla-at-wiris merged commit 05d277a into master Jun 18, 2024
15 checks passed
@carla-at-wiris carla-at-wiris deleted the fix/blackboard-issue-requests branch June 18, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant