Commit graph

100 commits

Author SHA1 Message Date
Daniel
01c4fc75da Use new microtask function in api module 2022-08-01 11:37:53 +02:00
Daniel
5bf056e584 Elaborate on open questions regarding CORS of browser extensions 2022-08-01 11:04:12 +02:00
Daniel
119dbaef97 Move security headers to the start of the router 2022-08-01 11:03:37 +02:00
Patrick Pacher
2431914756 Fix CORS preflight checks requiring authentication 2022-08-01 10:59:34 +02:00
Patrick Pacher
d30c4f4072
Automatically remove expired API keys from the setting 2022-07-27 15:27:42 +02:00
Patrick Pacher
4c6b834ae5
Add support for API token expiration 2022-07-27 14:59:52 +02:00
Daniel
efcea66226 Add better handling for panics within api endpoint handlers 2022-06-21 16:59:41 +02:00
Patrick Pacher
ba6dee246b
Restore http.Request body for http.HandlerFunc in api package 2022-05-03 16:09:40 +02:00
Daniel
dce16ad393 Add go profiling debug api endpoints 2022-04-13 11:18:40 +02:00
Daniel
deef6cdafc Mark config options as sensitive 2022-03-19 22:00:39 +01:00
Daniel
6650fb3b19 Update linter settings and fix warnings 2022-02-02 14:58:27 +01:00
Daniel
f59ad0357a Fix tests and linter warnings 2022-02-01 13:12:46 +01:00
Daniel
3a77659670 Use request.Host instead of the header's Host 2022-01-20 09:02:47 +01:00
Daniel
c92fcf340d Add CSRF protection 2022-01-11 08:58:07 +01:00
Daniel
1695420b0e Fix CORS handling 2021-11-28 23:48:45 +01:00
Daniel
08016b16cd Add Read/WriteMethod field to api.Endpoint 2021-11-24 16:36:39 +01:00
Daniel
93ff8eb19a Improve dev mode API security 2021-11-23 12:58:01 +01:00
Daniel
140389d142 Add option to supply HTTP status codes with API errors 2021-11-23 12:57:16 +01:00
Daniel
8c758e7e52 Improve endpoint metadata 2021-11-23 12:56:30 +01:00
Daniel
462570f0c9 Delete copy of dsd formats in database.record package 2021-11-23 12:56:13 +01:00
Daniel
52d83f6edd Add missing newlines to api ActionFunc messages 2021-11-17 14:23:08 +01:00
Daniel
22cd112eaf Fix api endpoint description 2021-11-09 10:11:12 +01:00
Daniel
f57c4a4874 Fix database api serialization warnings 2021-11-09 10:10:53 +01:00
Daniel
ac0a5176b3 Implement review suggestions 2021-09-27 12:50:50 +02:00
Daniel
442d9319e7 Fix typo 2021-09-17 22:01:06 +02:00
Patrick Pacher
b5e6e67e49 Add connect-src entry for *.safing.io 2021-08-24 13:12:40 +02:00
Daniel
bd46a92359 Fix typo 2021-06-01 12:57:07 +02:00
Daniel
1a4c98c93e Disable dns prefetch via HTTP header 2021-06-01 12:57:01 +02:00
Daniel
2b165c149a Wait for modules to be ready before calling http handlers 2021-05-17 14:42:02 +02:00
Daniel
8c1f2fcbe8 Remove debug msgs 2021-05-12 15:37:24 +02:00
Daniel
a41ea62d2d Add api for injecting events 2021-05-12 15:37:24 +02:00
Daniel
400f4c12ed Use gorilla/mux for endpoint paths 2021-05-12 15:37:24 +02:00
Daniel
8814d279bd Add api bridge for database 2021-05-11 14:59:33 +02:00
Daniel
8c1c522475 Use workers for database api handlers 2021-05-11 14:59:00 +02:00
Daniel
745a27d92d Fix required API methods 2021-05-11 14:58:28 +02:00
Daniel
480807a31c Improve flags 2021-05-05 00:11:10 +02:00
Daniel
4a05c26339 Clean API request paths 2021-03-10 11:44:29 +01:00
Daniel
89fad3d9ca Use HTTP security headers on all requests 2021-01-28 16:50:57 +01:00
Daniel
afdb367ada Remove unused middlewares and fix linter errors 2021-01-28 16:50:23 +01:00
Daniel
ab05924bcf Implement review suggestions 2021-01-19 16:26:44 +01:00
Daniel
40c2849bab Add config export via flag and API 2021-01-19 15:38:10 +01:00
Daniel
11e8271d41 Add API Key auth and improve endpoints 2021-01-19 15:37:55 +01:00
Daniel
4b2bfc3e8f Implement review suggestions 2021-01-08 16:46:11 +01:00
Daniel
7c7340c2e7 Move debug util to separate pkg to avoid import loop 2021-01-07 12:32:23 +01:00
Daniel
3244fefd43 Implement review suggestions 2021-01-06 13:34:25 +01:00
Daniel
5daeac8cf7 Add basic debug api endpoints 2020-12-30 23:50:17 +01:00
Daniel
9100dc999b Add endpoint api and authentication layer 2020-12-30 23:49:57 +01:00
Daniel
8eec5f4545 Improve config description 2020-12-21 14:56:33 +01:00
Daniel
8806469181 Update config wording and metadata 2020-11-04 14:35:54 +01:00
Daniel
cfbe4d9204 Add metadata to records sent via the API 2020-10-30 15:11:16 +01:00