mcerne
mcerne

Reputation: 23

Cloud foundry / XSA how to make http only service

We are working on SAP XS Advanced that is based on Cloud foundry and we got into a funny situation, we need an app to be HTTP only (I know it's not secure...but our situation requires it to be HTTP).

Does anyone know how to disable default deployment to HTTPS?

Upvotes: 1

Views: 79

Answers (1)

Daniel Mikusa
Daniel Mikusa

Reputation: 15006

You can have your application check if the connection came in over HTTP or HTTPS and if it's the latter, you can redirect the user to HTTP. Normally, you'd do the opposite, but it should work this way too.

On Cloud Foundry, you can check if the connection is HTTP or HTTPS by examining the X-Forwarded-Proto header. That will tell you either http or https. Alternatively, you could look at X-Forwarded-Port which would tell you 80 or 443.

How you do this and how you issue the redirect depends entirely on the application, language and frameworks you're using. Some may handle this automatically, some may require manual configuration or code changes.

Hope that helps!

Upvotes: 0

Related Questions