mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 00:29:36 +08:00
Merge pull request #4119 from mbaklor/v3-alpha
[V3] add ".html" to assetFileServer requests with no extension
This commit is contained in:
commit
bd59b8c724
@ -107,6 +107,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Ensure menu updates occur on the main thread by [@leaanthony](https://github.com/leaanthony)
|
||||
- The dragging and resizing mechanism is now more robust and matches expected platform behaviour more closely by [@fbbdev](https://github.com/fbbdev) in [#4100](https://github.com/wailsapp/wails/pull/4100)
|
||||
- Fixed [#4097](https://github.com/wailsapp/wails/issues/4097) Webpack/angular discards runtime init code by [@fbbdev](https://github.com/fbbdev) in [#4100](https://github.com/wailsapp/wails/pull/4100)
|
||||
- Fixed assetFileServer not serving `.html` files when non-extension request when `[request]` doesn't exist but `[request].html` does
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -71,7 +71,15 @@ func (d *assetFileServer) serveFSFile(rw http.ResponseWriter, req *http.Request,
|
||||
|
||||
file, err := d.fs.Open(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
if s := path.Ext(filename); s == "" {
|
||||
filename = filename + ".html"
|
||||
file, err = d.fs.Open(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user