Is there a way to set static resource (js、css、fonts、wasm、images) server host?

by default, static resource request、xhr request will requesting onlyoffice docservice。i want docserivce only handle xhr request, so one server can afford more user request. now i optimize static resource request,through upload static resource files to oss server and edit nginx config, like following codes:

location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(web-apps|sdkjs|sdkjs-plugins|fonts)(\/.*)$ {
   expires 365d;
   set $folder_path $2;
   set $file_path   $3;

   add_header Accept-Encoding "gzip";
   return 301 $redirect_host$folder_path$file_path;

    #alias /var/www/onlyoffice/documentserver/$folder_path$file_path;
} 

However, my solution has one slightly imperfect aspect: each static resource loading requires two server requests. The first request goes to the docservice server, which then returns a 301 status redirect to the OSS server. Secondly, the browser requests the OSS server and receives a 304 status, after which the browser loads the static resource from the cached file in the browser. Throughout this process, the first step is entirely redundant. I hope the SDK can provide a way to directly set the server address for requesting static resources, thus enabling faster loading speeds for frontend pages.

Hello @isNaN

Frankly, I’m not sure if such scenario was even considered for Document Server. Generally, Document Server manages all incoming requests by itself and I don’t see how it is possible to manage request to static data that Document Server relies on without making a request to Document Server itself in the first place. This is quite complex scenario.

I believe this scenario should be processed in details. I recommend contacting our Sales department to discuss the options for separate analysis: