aboutsummaryrefslogtreecommitdiff
path: root/internal/cmd/web.go
Commit message (Collapse)AuthorAge
* refactor(db): move some methods off `user.go` (#7199)Joe Chen2022-10-22
|
* refactor(db): move some methods from `user.go` to `users.go` (#7195)Joe Chen2022-10-22
|
* web: enable `ETag` to improve loading speed of static resources (#7035)shlande2022-06-09
| | | Co-authored-by: shlande <shlandeme@icloud.com>
* web: print accessible URL on startup (#6979)Joe Chen2022-05-29
|
* attachment: set CSP header in the serving endpoint (#6926)Joe Chen2022-05-03
|
* assets: convert usage of go-bindata to Go embed (#6851)Michael Li2022-03-17
| | | Co-authored-by: Joe Chen <jc@unknwon.io>
* autofix: format code with gofumpt and gofmt (#6803)deepsource-autofix[bot]2022-03-06
| | | Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* web: correctly handle go-get pages for repository roots (#6598)James-REANNZ2021-08-26
| | | Fixes regression in go-get handling introduced in #6318.
* web: correctly serving go-get pages for subdirs (#6318)ᴜɴᴋɴᴡᴏɴ2020-09-09
| | | | | | | * web: correctly serving go-get page for subdirs * Update CHANGELOG * Fix golint error
* route: bypass require signin check for trigger repo tasks (#6079)ᴜɴᴋɴᴡᴏɴ2020-04-08
| | | | | | | * route: bypass require signin check for trigger repo tasks * CHANGELOG * Fix lint errors
* route: no session for routes without UI (#6066)ᴜɴᴋɴᴡᴏɴ2020-04-05
| | | Not all routes need session, register session and CSRF middleware as global is a waste of resource, and creating a lot one-time off yet never used session records.
* lfs: run e2e and fix minor issues (#6059)ᴜɴᴋɴᴡᴏɴ2020-04-05
|
* lfs: implement HTTP routes (#6035)ᴜɴᴋɴᴡᴏɴ2020-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bootstrap with GORM * Fix lint error * Set conn max lifetime to one minute * Fallback to use gorm v1 * Define HTTP routes * Finish authentication * Save token updated * Add docstring * Finish authorization * serveBatch rundown * Define types in lfsutil * Finish Batch * authutil * Finish basic * Formalize response error * Fix lint errors * authutil: add tests * dbutil: add tests * lfsutil: add tests * strutil: add tests * Formalize 401 response
* web: rename CSRF header (#6027)ᴜɴᴋɴᴡᴏɴ2020-03-28
|
* csrf: set cookie HttpOnly and Secure (#6013)ᴜɴᴋɴᴡᴏɴ2020-03-27
|
* webhook: overhaul route handlers (#6002)ᴜɴᴋɴᴡᴏɴ2020-03-22
| | | | | | | | | | | | | | | * Overual route handlers and fixes #5366 * Merge routes for repo and org * Inject OrgRepoContext * DRY validateWebhook * DRY c.HasError * Add tests * Update CHANGELOG
* admin: use POST to run operations (#5997)ᴜɴᴋɴᴡᴏɴ2020-03-21
| | | | | | | * admin: use POST to run operations Fixed CSRF reported by Wenxu Wu of Tencent's Xuanwu Lab. * Update CHANGELOG
* ipynb: sanitize rendered HTML (#5996)ᴜɴᴋɴᴡᴏɴ2020-03-21
| | | | | | | | | * ipynb: sanitize rendered HTML Fixes #5170 * Remove hardcode URL * Add tests
* refactor: unify error handling in routing layerᴜɴᴋɴᴡᴏɴ2020-03-16
|
* conf: overhaul settings (#5953)ᴜɴᴋɴᴡᴏɴ2020-02-29
| | | | | | | | | | | | | | * Overhaul cache settings * Overhaul HTTP settings * conf: overhaul more settings * log: make LGTM happy * travis: upload report to Codecov * Add codecov.yml
* conf: overhaul sessions settings (#5952)ᴜɴᴋɴᴡᴏɴ2020-02-29
|
* conf: overhaul auth and user settings (#5942)ᴜɴᴋɴᴡᴏɴ2020-02-27
| | | | | | * conf: overhaul auth and user settings * ci: update travis Go versions
* cmd/web: fix wrong ExternalURL when specify port via CLI flagᴜɴᴋɴᴡᴏɴ2020-02-24
| | | | Fixes #5936.
* cmd/web: fix error when Unix socket not existsᴜɴᴋɴᴡᴏɴ2020-02-24
|
* conf: overhaul security settingsᴜɴᴋɴᴡᴏɴ2020-02-22
|
* cmd: fix unable to find correct custom configᴜɴᴋɴᴡᴏɴ2020-02-22
|
* conf: overhaul server settings (#5928)ᴜɴᴋɴᴡᴏɴ2020-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * conf: rename package * Requires Go 1.12 * Fix lint * Fix lint * Overhaul * db: fix tests * Save my work * Fix tests * Server.UnixSocketPermission * Server.LocalRootURL * SSH settings * Server.OfflineMode * Save my work * App.Version * Remove [server] STATIC_ROOT_PATH * Server.LandingURL
* log: migrate to unknwon.dev/clog/v2 (#5927)ᴜɴᴋɴᴡᴏɴ2020-02-20
| | | | | | * Add unknwon.dev/clog/v2 * Update all places
* Use go-bindata to embed `public` and `templates` files into binary (#5920)Michael Li2020-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fixed private repositories are hidden in the organization's view * use go-bindata integrate public and templates files to gogs binary * optimize Dockerfile don't COPY public and templates files * use kevinburke's go-bindata to generate assets code * reset develepment as default run mode in configure file * optimize generated assets code relayout and help function * fixed code format * Update conf/app.ini * assets: add LICENSE headers * Some housekeeping * assets/public: simplify code logic * assets/templates: simplify code logic * cmd/web: more concise variable names * Minor changes * Add custom public and templates support back Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
* tls: update default CurvePreferences and CipherSuites (#5850)Kasei2019-11-05
| | | | | | | | | * Enable X25519 curve and reorder curve list to improve key exchange performance * Enable ECDSA ciphers for EC certs * Enable CHACHA20_POLY1305 ciphers * Disable RSA key exchange algorithm which don't provide PFS * Disable non-AEAD ciphers Signed-off-by: Kasei Wang <kasei@kasei.im>
* web: fix panic when download attachments (#5838)Unknwon2019-10-24
|
* internal: move packages under this directory (#5836)Unknwon2019-10-24
* Rename pkg -> internal * Rename routes -> route * Move route -> internal/route * Rename models -> db * Move db -> internal/db * Fix route2 -> route * Move cmd -> internal/cmd * Bump version