diff --git a/CHANGELOG.md b/CHANGELOG.md index eacb650..ae01a15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- Set Origin since Edisu banned requests without it ## [0.1.6] - 2022-06-29 - Add dialog to show what's new after an update diff --git a/lib/utilities/inceptor.dart b/lib/utilities/inceptor.dart index 88aa774..4b02855 100644 --- a/lib/utilities/inceptor.dart +++ b/lib/utilities/inceptor.dart @@ -35,6 +35,8 @@ Future initInceptor() async { InterceptorsWrapper( onRequest: (options, handler) async { options.headers[HttpHeaders.userAgentHeader] = "Open Edisu"; + options.headers["Origin"] = + "https://edisuprenotazioni.edisu-piemonte.it"; final token = await flutterSecureStorage.read(key: 'token'); if (token != null) { options.headers[HttpHeaders.authorizationHeader] = "Bearer $token";