Best way redirect REST service request on glassfish + JAX-RS to https URL? -


i have implemented rest service on glassfish4 + jax-rs. want use https connection authentication.

the uri http http://myhost/myapp/services/rest/myservice , https https://myhost_2/myapp/services/rest/myservice. want prevent usage of http://myhost/myapp/services/rest/myservice.

i think 1 way redirect request on http://myhost in rest jax-rs class https://myhost_2. way? how can implement this?

you answer requests http 301 (moved permanently, telling client use new location in future requests) pointing https equivalent in location header of response.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -