-
Notifications
You must be signed in to change notification settings - Fork 2k
My JavaScript Page is returning blank via the Nginx Ingress #925
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
Comments
It seems, based on your annotations of the type Could you possibly let me know which one you are using? If you are using the Community one, I suggest you open an issue there as we can't help. If you are using ours, I am afraid those annotations won't work (our annotations are here, they start with Let me know if this makes sense, thanks. |
Hi @Rulox |
Can you first use the rewrite with our annotations? I want to make sure that your application is able to get your static JS files correctly. I see you used the rewrite to Let me know if it works after doing the annotations change please, if not, I'll try to help you with other ideas. It seems to me it's a problem with paths of the js statics, so maybe the rewrite can help. PS: It's difficult to debug this because is most likely due to how the application works. Depending on how the app manages static files/paths maybe a different config is required. |
So i updated the annotations to:
The behaviour is the same. |
Please pay attention to the annotations in the documentation, changing the prefic to And for your other question, let me know if this example helps you to understand rewrites with the Ingress Controller a little bit better. PS: One question, do you really need all these annotations for your application? I suggest to start easy and try to make the Ingress Controller work without annotations, except the ones that are necessary for your app to work. Is your application an JS application? Is it running in a port or you are just showing a static html + js? |
Hi @Rulox However now i find a different error in the browser console, stating that the files were loaded despite MIME (“text/html”) not being a valid JavaScript MIME type.
It is a Java application that serves an JS page. |
Hello. So after adding
The page was finally being presented. |
Hi Guys.
So i was just configuring my nginx ingress, and after making a HTTPS service accessible with HTTPS, i am now facing another problem. The IP and path are resolved and the service returns the webpage (if i inspect the element, it shows the same source code as the a working page i have in another location).
However, it seems that the page internally is not handling the paths well.
So my app works as follows:
https://app-container:portA/mandatory_path
returns the desired behaviour.
So i configured a Service with portB that connects to the application on portA. Within the cluster, if i access service_name:portB/mandatory_path it will load the page as expected.
No on my ingress i configured it like this (note that it has https end to end):
On the browser i see this in the console:
client.js” was loaded despite its MIME type (“text/html”) not being a valid JavaScript MIME type
...
ReferenceError: rwt is not defined
So now i don't know if there is anything i can change on the path configurations, or if i have to change the web application which i did not develop.
On the Nginx contoller the configuration for this location shows like this:
Thanks in advance for the patience!
The text was updated successfully, but these errors were encountered: