kore-doc

The kore documentation found under https://docs.kore.io/
Commits | Files | Refs | README | git clone https://git.kore.io/kore-doc.git

filemap.md (939B)



      1 # Filemaps
      2 
      3 A filemap is a configuration option in Kore that allows mapping
      4 of on-disk files to a URI root.
      5 
      6 A filemap must be declared inside of a domain block.
      7 
      8 ```
      9 domain kore.io {
     10 	filemap		/3.2.0/		docs_3_2_0
     11 }
     12 ```
     13 
     14 The first argument is the URI root and the second is the on-disk
     15 path where the files will be served from.
     16 
     17 Thus from the example above the URL /3.2.0/index.html will be served from
     18 the file docs\_3\_2\_0/index.html.
     19 
     20 Kore has the following built-in MIME types:
     21 
     22 | Extension | MIME type|
     23 | --- | --- |
     24 | gif | image/gif |
     25 | png | image/png |
     26 | jpeg | image/jpeg |
     27 | jpg | image/jpeg |
     28 | zip | application/zip |
     29 | pdf | application/pdf |
     30 | json | application/json |
     31 | js | application/javascript |
     32 | htm | text/html |
     33 | txt | text/plain |
     34 | css | text/css |
     35 | html | text/html |
     36 
     37 Additional MIME types can be added via the **http\_media\_type** configuration option.
     38 
     39 ```
     40 http_media_type [mime type] ext1 ext2 extN
     41 ```