Google Cloud Endpoint Redirection 301

I configure a custom domain for my cloud endpoint application, I know this feature does't work with endpoint put it work for the static html page that consumes endpoint services using CORS and reactjs. And it's work fine.

But for SOE I want to redirect to with 301 redirection for the root page, and I think that the ajax CORS calls will not be impacted by the redirection.

Update : I try to use meta tag in index.html page and create another but it's take time and I can't redirect on the root url (because I will go to infinity loop I think, I don't try).



Some points to resolve redirection of html application page in Google-cloud-endpoint using a servlet filter :

  • If there is statics files it bypass filter or servlet mapping
  • You can not map the filter to empty (it do a bad configuration error on web.xml) so you map
  • You can not use welcome page web.xml configuration
  • The filter had to dispatch to the html page if on the good server name and redirect if on the old server name