Compare commits
	
		
			2 commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 58050a44a4 | |||
| 63f484e269 | 
					 2 changed files with 9 additions and 4 deletions
				
			
		| 
						 | 
					@ -53,5 +53,5 @@ func New(filename string) (config Config, err error) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (config *Config) ParseApplicationConfig(v any) {
 | 
					func (config *Config) ParseApplicationConfig(v any) {
 | 
				
			||||||
	yStr, _ := yaml.Marshal(config.Application)
 | 
						yStr, _ := yaml.Marshal(config.Application)
 | 
				
			||||||
	yaml.Unmarshal(yStr, &v)
 | 
						yaml.Unmarshal(yStr, v)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										11
									
								
								pkg.go
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								pkg.go
									
										
									
									
									
								
							| 
						 | 
					@ -305,9 +305,14 @@ func (service *Service) StaticHandler(w http.ResponseWriter, r *http.Request, se
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		r.URL.Path = fmt.Sprintf("/%s/%s", comp[1], comp[2])
 | 
							r.URL.Path = fmt.Sprintf("/%s/%s", comp[1], comp[2])
 | 
				
			||||||
		p := fmt.Sprintf(service.staticDirectory+"/%s/%s", comp[1], comp[2])
 | 
							p := fmt.Sprintf(service.staticDirectory+"/%s/%s", comp[1], comp[2])
 | 
				
			||||||
		_, err = os.Stat(p)
 | 
					
 | 
				
			||||||
		if err == nil {
 | 
							if service.useStaticDirectory {
 | 
				
			||||||
			service.staticLocalFileserver.ServeHTTP(w, r)
 | 
								_, err = os.Stat(p)
 | 
				
			||||||
 | 
								if err == nil {
 | 
				
			||||||
 | 
									service.staticLocalFileserver.ServeHTTP(w, r)
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									service.staticEmbeddedFileserver.ServeHTTP(w, r)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			service.staticEmbeddedFileserver.ServeHTTP(w, r)
 | 
								service.staticEmbeddedFileserver.ServeHTTP(w, r)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue