Matt Gibson
4377c7a897
Rewrite Icon fetching ( #3023 )
...
* Rewrite Icon fetching
* Move validation to IconUri, Uri, or UriBuilder
* `dotnet format` 🤖
* PR suggestions
* Add not null compiler hint
* Add twitter to test case
* Move Uri manipulation to UriService
* Implement MockedHttpClient
Presents better, fluent handling of message matching and response
building.
* Add redirect handling tests
* Add testing to models
* More aggressively dispose content in icon link
* Format 🤖
* Update icon lockfile
* Convert to cloned stream for HttpResponseBuilder
Content was being disposed when HttResponseMessage was being disposed.
This avoids losing our reference to our content and allows multiple
usages of the same `MockedHttpMessageResponse`
* Move services to extension
Extension is shared by testing and allows access to services from
our service tests
* Remove unused `using`
* Prefer awaiting asyncs for better exception handling
* `dotnet format` 🤖
* Await async
* Update tests to use test TLD and ip ranges
* Remove unused interfaces
* Make assignments static when possible
* Prefer invariant comparer to downcasing
* Prefer injecting interface services to implementations
* Prefer comparer set in HashSet initialization
* Allow SVG icons
* Filter out icons with unknown formats
* Seek to beginning of MemoryStream after writing it
* More appropriate to not return icon if it's invalid
* Add svg icon test
2023-08-08 19:29:40 +00:00
Justin Baur
7f5f010e1e
Run formatting ( #2230 )
2022-08-29 16:06:55 -04:00
Justin Baur
bae03feffe
Revert filescoped ( #2227 )
...
* Revert "Add git blame entry (#2226 )"
This reverts commit 239286737d .
* Revert "Turn on file scoped namespaces (#2225 )"
This reverts commit 34fb4cca2a .
2022-08-29 15:53:48 -04:00
Justin Baur
34fb4cca2a
Turn on file scoped namespaces ( #2225 )
2022-08-29 14:53:16 -04:00
Justin Baur
231eb84e69
Turn On ImplicitUsings ( #2079 )
...
* Turn on ImplicitUsings
* Fix formatting
* Run linter
2022-06-29 19:46:41 -04:00
Vincent Salucci
452677e441
[Icons] Update not found image ( #1836 )
2022-02-01 23:09:24 -06:00
Vince Grassia
2ec10cfd2a
Standardize '/version' endpoint on all services ( #1755 )
2021-12-09 15:45:45 -05:00
Kyle Spearrin
78606d5f13
endpoint to display config settings ( #1150 )
2021-02-18 15:15:08 -05:00
Kyle Spearrin
1ca6e917af
return fa-globe icon when not found ( #1149 )
2021-02-18 12:18:50 -05:00
Chad Scharf
9800b752c0
Changed all C# control flow block statements to include space between keyword and open paren
2020-03-27 14:36:37 -04:00
Kyle Spearrin
00d1bbf0ee
GetAlive for icons server
2019-08-03 23:26:34 -04:00
Kyle Spearrin
7fd79388e2
dont try to fetch ip address icons
2018-08-25 17:30:45 -04:00
Kyle Spearrin
6f7d07530a
log domain with warnings
2018-08-25 16:59:54 -04:00
Kyle Spearrin
0956374a06
icon server logging
2018-08-25 16:41:26 -04:00
Kyle Spearrin
9cdc024956
disable subdomain normalization
2018-07-30 21:22:50 -04:00
Kyle Spearrin
18b7bcb9e3
no response cache. manual CacheControl middleware
2018-06-18 13:35:46 -04:00
Kyle Spearrin
7ee659e3b1
setting for disabling icons cache
2018-06-18 08:31:37 -04:00
Kyle Spearrin
961c0c6749
null cached entries are high priority
2018-05-29 22:38:29 -04:00
Kyle Spearrin
fbdb600f22
specify cache size
2018-05-29 22:36:32 -04:00
Kyle Spearrin
1cfc95df7c
icon fetch fixes
2018-05-25 12:50:21 -04:00
Kyle Spearrin
6859f3ebbc
cache not found
2018-05-24 17:18:33 -04:00
Kyle Spearrin
0e4ffc7d7f
new icon fetching service. remove besticon dep.
2018-05-22 12:49:34 -04:00
Kyle Spearrin
cf7cfee9e0
header checks. alternate ico media type
2018-03-28 13:32:01 -04:00
Kyle Spearrin
9ed1ae9567
allow octet streams
2018-03-19 08:11:23 -04:00
Kyle Spearrin
8d681738c8
allowed media types for icon images
2018-03-03 14:12:57 -05:00
Kyle Spearrin
cf2183471c
no need to check image header
2018-03-03 13:59:31 -05:00
Kyle Spearrin
55cfc44776
check that image bytes are actually an image
2018-03-02 16:07:29 -05:00
Kyle Spearrin
221f5fa154
recursively follow redirects
2017-11-10 21:48:49 -05:00
Kyle Spearrin
43f8fb04d4
adjust icon size query
2017-10-25 12:54:00 -04:00
Kyle Spearrin
378f87ab69
cache icons for 7 days
2017-10-25 12:52:55 -04:00
Kyle Spearrin
aa07c6fae4
decompress gzipped icons
2017-10-21 23:04:51 -04:00
Kyle Spearrin
82635f20c9
manually handle redirects for android blocks
2017-10-21 21:48:11 -04:00
Kyle Spearrin
c10245eea6
Revert "larger fallback URL for mobile"
...
This reverts commit 0813b290b6 .
2017-10-20 23:33:33 -04:00
Kyle Spearrin
0813b290b6
larger fallback URL for mobile
2017-10-20 23:14:33 -04:00
Kyle Spearrin
38106840b9
fallback globe image
2017-10-12 23:56:34 -04:00
Kyle Spearrin
a35055b66d
do not cache large images or nulls
2017-10-12 10:41:13 -04:00
Kyle Spearrin
4c3c594603
use png extension for CDN caching
2017-10-12 10:00:44 -04:00
Kyle Spearrin
ac901716cf
response caching for 24 hours
2017-10-10 21:35:52 -04:00
Kyle Spearrin
f8c5bc1c39
&& fix
2017-10-09 16:23:48 -04:00
Kyle Spearrin
2c21e3e100
change qs from domain to url
2017-10-09 16:21:37 -04:00
Kyle Spearrin
02c4bb3037
configurable cache size limit
2017-10-09 14:54:32 -04:00
Kyle Spearrin
051d64a460
use AbsoluteExpirationRelativeToNow
2017-10-09 14:45:00 -04:00
Kyle Spearrin
609ace6846
mappedDomain is cache key
2017-10-09 14:43:33 -04:00
Kyle Spearrin
fe01a51a51
remove additional queries since they can be abused
2017-10-09 14:43:15 -04:00
Kyle Spearrin
309c7f81ba
formats
2017-10-09 14:34:44 -04:00
Kyle Spearrin
c88f4064f1
allow custom size to be passed in
2017-10-09 14:25:59 -04:00
Kyle Spearrin
4d7bd85490
domain mapping service and more cleanup
2017-10-09 14:21:20 -04:00
Kyle Spearrin
c52add4051
icons settings
2017-10-09 14:02:57 -04:00