add apiUrlPrefix
This commit is contained in:
		
							parent
							
								
									360a53b84a
								
							
						
					
					
						commit
						1e32d4a631
					
				@ -243,3 +243,10 @@ The permissions:
 | 
			
		||||
          com.example.hello     # refers to /srv/walnut/packages/pages/com.example.hello
 | 
			
		||||
          '''
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
API
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
req.apiUrlPrefix => https://api.example.com/api/tld.domain.pkg
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
@ -517,6 +517,12 @@ module.exports.create = function (xconfx, apiFactories, apiDeps) {
 | 
			
		||||
      var hasBeenHandled = false;
 | 
			
		||||
 | 
			
		||||
      // Existing (Deprecated)
 | 
			
		||||
      Object.defineProperty(req, 'apiUrlPrefix', {
 | 
			
		||||
        enumerable: true
 | 
			
		||||
      , configurable: false
 | 
			
		||||
      , writable: false
 | 
			
		||||
      , value: 'https://' + clientApiUri + '/' + pkgId
 | 
			
		||||
      });
 | 
			
		||||
      Object.defineProperty(req, 'experienceId', {
 | 
			
		||||
        enumerable: true
 | 
			
		||||
      , configurable: false
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user