mirror of
				https://github.com/gristlabs/grist-core.git
				synced 2025-06-13 20:53:59 +00:00 
			
		
		
		
	
							parent
							
								
									35a429d99e
								
							
						
					
					
						commit
						1cf52e1b0a
					
				@ -275,7 +275,7 @@ Grist can be configured in many ways. Here are the main environment variables it
 | 
			
		||||
| GRIST_ENABLE_REQUEST_FUNCTION      | enables the REQUEST function. This function performs HTTP requests in a similar way to `requests.request`. This function presents a significant security risk, since it can let users call internal endpoints when Grist is available publicly. This function can also cause performance issues. Unset by default.                                            |
 | 
			
		||||
| GRIST_HIDE_UI_ELEMENTS             | comma-separated list of UI features to disable. Allowed names of parts: `helpCenter,billing,templates,createSite,multiSite,multiAccounts,sendToDrive,tutorials,supportGrist`. If a part also exists in GRIST_UI_FEATURES, it will still be disabled.                                                                                                          |
 | 
			
		||||
| GRIST_HOST                         | hostname to use when listening on a port.                                                                                                                                                                                                                                                                                                                     |
 | 
			
		||||
| GRIST_HTTPS_PROXY                  | if set, use this proxy for webhook payload delivery.                                                                                                                                                                                                                                                                                                          |
 | 
			
		||||
| GRIST_HTTPS_PROXY                  | if set, use this proxy for webhook payload delivery or fetching custom widgets repository from url.                                                                                                                                                                                                                                                                                                          |
 | 
			
		||||
| GRIST_ID_PREFIX                    | for subdomains of form o-*, expect or produce o-${GRIST_ID_PREFIX}*.                                                                                                                                                                                                                                                                                          |
 | 
			
		||||
| GRIST_IGNORE_SESSION               | if set, Grist will not use a session for authentication.                                                                                                                                                                                                                                                                                                      |
 | 
			
		||||
| GRIST_INCLUDE_CUSTOM_SCRIPT_URL    | if set, will load the referenced URL in a `<script>` tag on all app pages.                                                                                                                                                                                                                                                                                    |
 | 
			
		||||
 | 
			
		||||
@ -9,6 +9,7 @@ import {GristServer} from 'app/server/lib/GristServer';
 | 
			
		||||
import LRUCache from 'lru-cache';
 | 
			
		||||
import * as url from 'url';
 | 
			
		||||
import { AsyncCreate } from 'app/common/AsyncCreate';
 | 
			
		||||
import { proxyAgent } from 'app/server/lib/ProxyAgent';
 | 
			
		||||
 | 
			
		||||
// Static url for UrlWidgetRepository
 | 
			
		||||
const STATIC_URL = process.env.GRIST_WIDGET_LIST_URL;
 | 
			
		||||
@ -109,7 +110,7 @@ export class UrlWidgetRepository implements IWidgetRepository {
 | 
			
		||||
      return [];
 | 
			
		||||
    }
 | 
			
		||||
    try {
 | 
			
		||||
      const response = await fetch(this._staticUrl);
 | 
			
		||||
      const response = await fetch(this._staticUrl, { agent: proxyAgent(new URL(this._staticUrl)) });
 | 
			
		||||
      if (!response.ok) {
 | 
			
		||||
        if (response.status === 404) {
 | 
			
		||||
          throw new ApiError('WidgetRepository: Remote widget list not found', 404);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user