mirror of
				https://github.com/binwiederhier/ntfy.git
				synced 2025-10-31 13:02:24 +01:00 
			
		
		
		
	Fix content type for config.js
This commit is contained in:
		
							parent
							
								
									70538783d8
								
							
						
					
					
						commit
						750be7f07e
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -340,9 +340,9 @@ func (s *Server) handleWebConfig(w http.ResponseWriter, r *http.Request) error { | |||
| 		appRoot = "/app" | ||||
| 	} | ||||
| 	disallowedTopicsStr := `"` + strings.Join(disallowedTopics, `", "`) + `"` | ||||
| 	w.Header().Set("Content-Type", "application/json") | ||||
| 	w.Header().Set("Content-Type", "text/javascript") | ||||
| 	_, err := io.WriteString(w, fmt.Sprintf(`// Generated server configuration | ||||
| var config = {  | ||||
| var config = { | ||||
|   appRoot: "%s", | ||||
|   disallowedTopics: [%s] | ||||
| };`, appRoot, disallowedTopicsStr)) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Philipp Heckel
						Philipp Heckel