CAS 5.3.1 and random 404 - cas

We are randomly redirected to domain by CAS and end up in 404 response. We thought to create static 404 error page. But problem is CAS has embedded tomcat which is responsive to domain.com/cas context-path. And we want error page on domain.com/.
How can I achieve that?
Related post I created: Spring boot multiple contexts - one for public error

But problem is CAS has embedded tomcat which is responsive to domain.com/cas context-path. And we want error page on domain.com/.
Spring Boot applications that use an embedded tomcat container only respond to requests mapped to the context-path, which in your case is /cas. There is no such thing as "/" or ROOT when dealing with an embedded container.
So you'll need to either use an external tomcat instance, or change your context-path to "/".

Related

how to solve the 413 entity too large in Bean Stack Configuration for ktor server?

After deploying the app on beanstack I am getting the 413 Entity too large Exception. I know the reason of this Exception but I don't know where can I need to configure this client request body max size in ktor project or Beanstack.
I tried to increase the size on client request body and added the custom configuration in the .platform/nginx/conf.d/myConfig.conf and .ebextensions/nginx/conf.d/proxy.conf files but didn’t get any luck.
Note: It is working fine in local but getting this issue after deploying...
myConfig.congis an incorrect config file for configuring nginx. The correct files have extension *.conf as described in AWS docs.

Heroku app: Error during WebSocket handshake: Unexpected response code: 200

I followed a tutorial on how to make a multiplayer tetris game, here is the repo:
https://github.com/Leftier/tetris
It worked just fine on localhost so I tried to deploy it in heroku (https://tetrixtest.herokuapp.com/ --ASD to move Q/E to rotate) but I get the following error:
WebSocket connection to 'wss://tetrixtest.herokuapp.com/' failed: Error during WebSocket handshake: Unexpected response code: 200
while trying to create the webSocket in this line (connection-manager.js line 14):
this.conn = new WebSocket(`wss://${window.location.hostname}:${window.location.port}`)
I don't know much about webSockets,
at first I thought that heroku was not able to handle websockets but that wasn't the case so I tried using the link directly as an argument instead of reading it from the browser but still the same issue.
I would like some clues/hints about why does this happens, I searched in google and github, but I only found issues related to socket.io
For me the solution was to turn on "Session affinity" by running this command heroku features:enable http-session-affinity
More info at https://devcenter.heroku.com/articles/session-affinity
Session affinity, sometimes referred to as sticky sessions, is a
platform feature that associates all HTTP requests coming from an
end-user with a single application instance (web dyno).

http 404 error in eclipse

got this error when i created a single html page and i have also have another web project in eclipse
HTTP Status 404 - /Angular/
type Status report
message /Angular/
description The requested resource is not available.
Apache Tomcat/7.0.82
HTTP Status 404 - /Angular/
type Status report
message /Angular/
description The requested resource is not available.
Apache Tomcat/7.0.82
When deploying a server in eclipse, ensure that you've added your eclipse project as a web module to the server. To see that on your existing server, double click it, and go to the modules tab.
Now, take note of the path at which you've deployed the module. You may need to change that path to /Angular instead of your eclipse project name.

Where is Couchbase Sync Gateway AdminUI?

I have already set "adminUI": "0.0.0.0:4985/_admin/" in my config. I still get 404 page not found when going to the endpoint (e.g. http://<host IP>:4985/_admin/).
This is the description of the config line adminUI from http://developer.couchbase.com/documentation/mobile/1.2/develop/guides/sync-gateway/configuring-sync-gateway/config-properties/index.html
URL of the Sync Gateway Admin Console HTML page. The default is the bundled Sync Gateway Admin Console at localhost:4985/_admin/.
I got this hint from https://github.com/couchbase/sync_gateway/blob/aba088a902b162bcaed745510f4d012b8908a303/rest/config.go#L64
AdminUI *string `json:",omitempty"` // Path to Admin HTML page, if omitted uses bundled HTML
I omitted the line "adminUI": "0.0.0.0:4985/_admin/" from the config file to get the bundled Couchbase Sync Gateway Admin UI HTML page.

nginx modifying the jsonp response message

We are creating a web api application. In one of our API's if there are any validation errors, we are returning the error message in JSONP format. In the API Request URL user adds a query string parameter ?jsoncallback=xxxxxxxxxx like this.
On validation failure we are throwing a 400 bad request JSONP with response message in the below format:
xxxxxxxxxx({"error","error message"})
It is working good in all the environments, where there is no nginx. In our staging environment we have nginx configured.
Here it is modifying the output as below:
badrequest{"error","error message"})
Because of this our front end application is unable to read the response message.
Could you please let me know, what configuration setting of nginx could cause this problem?
Thanks in Advance
Venkat.
Actually the problem is not due to nginx.
It is due to IIS 7.5 in our staging server which is causing the problem.
Below configuration change in web.config has fixed it.
<httpErrors errorMode="Detailed" />