Comments (5)
I was able to get it running with a combination of ingress (without rewriting) and UsePathBase
:
ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: kubernetesvirtualdirectorytest-ingress
labels:
service: kubernetesvirtualdirectorytest
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: "kubernetesvirtualdirectorytest.local"
http:
paths:
- path: /sub-app
pathType: Prefix
backend:
service:
name: kubernetesvirtualdirectorytest
port:
number: 80
Startup.cs
...
app.UsePathBase("/sub-app");
app.UseRouting();
...
Are you using rewrite rule on the ingress to remove the /assessments
segment? I think this would be the problem - the app needs to know it is running in a virtual directory so it would generate the URLs correctly.
from dotvvm.
It seems that DotVVM doesn't know that the URL rewriting in Ingress is happening.
Can you try calling UsePathBase
and specify the "/assessments"
so DotVVM will know on which "real" URL it is running?
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-7.0#work-with-path-base-and-proxies-that-change-the-request-path
from dotvvm.
Thank you for the response,
I tried what you suggested and set the path base when running behind the ingress.
i also made sure that UsePathBase is being applied before the call to app.UseRouting as described in the msdn article.
` if (Configuration["Assessments:IngressPath"].Length > 0)
{
logger.LogCritical($"SETTING PathBase to {Configuration["Assessments:IngressPath"]}");
app.UsePathBase(Configuration["Assessments:IngressPath"]);
}
app.UseRouting();
`
I can tell that the call to UsePathBase is happening when running in kube because I can see my log entries being written.
'crit: Netalytics.Assessments.Frontend.Startup[0]
SETTING PathBase to /assessments
'
Unfortunately, when I go to the page it's still looking for the dotvvm--internal script without taking the path into account.
Its like UsePathBase didnt really affect it.
from dotvvm.
Thanks for the info, I'll try to reproduce it on my cluster.
from dotvvm.
I'm closing this, I assume it worked. Please reopen or open a new issue if the problem persists
from dotvvm.
Related Issues (20)
- Default DotvvmPresenter should not be registered as IDotvvmPresenter
- Add JS translations for Enumerable Sum HOT 1
- Add JS translations for DateOnly and TimeOnly
- Dynamic hide and show the EmptyItemText in ComboBox HOT 4
- Postback handlers does not work in composite controls
- JsonReaderException error with UseExceptionHandler and postback HOT 7
- dot:ModalDialog control
- Error when resolving attributes with xml namespaces
- Assembly in Directive is giving an error HOT 1
- How do I connect a ComboBox to a DataTable in .NET ? HOT 1
- Support more fields in GridView SortExpression HOT 1
- Exception when use resource and last character is & HOT 1
- Invocation of static command on ViewModel does not resolve dependecies from IoC HOT 1
- Validation not working (throws error 500) when data source for bs:FormControlComboBox contains value "null".
- Add html capability to grid columns
- Add comment property to ContentPlaceHolder for design-time use
- Dictionary item retrieval binding throws although item exists. HOT 2
- dot:Label For property Html proper labelling of corresponding form fields
- Change behaviour of DotVVM02 warning for overrides
- Please support `DateOnly` params in constructors of sub view models or support it for MinDate property of the bp:DatePicker control HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotvvm.