Running this app on simulator, emulator or physical TV device, GET requests succeed but POST requests contain a ‘Origin: file://’ header. This is not accepted by the back-end:
Accept:
application/json, text/plain, */*
Content-Type:
application/json
Origin:
file://
User-Agent:
Mozilla/5.0 (SMART-TV; LINUX; Tizen 4.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 TV Safari/537.36
Our project is a react-native-web app using Axios as network library.
How can we exclude this Origin header from POST requests?
POST request contains ‘Origin: file://’ header
We are creating a react-native-web project configured with these relevant config properties:
<?xml version=“1.0” encoding=“UTF-8”?>
<widget xmlns=“http ://www.w3.org/ns/widgets” xmlns:tizen=“http ://tizen.org/ns/widgets” id=“<redacted>” version=“0.0.1” viewmodes=“maximized”>
<access origin=“*” subdomains=“true”></access>
<tizen:allow-navigation>*</tizen:allow-navigation>
<tizen:application id=“<redacted>“ package=“<redacted>“ required_version=“3.0”/>
<content src=“index.html”/>
<tizen:content-security-policy>script-src ‘self’</tizen:content-security-policy>
<feature name=“http ://tizen.org/feature/screen.size.normal.1080.1920”/>
<feature name=“http ://tizen.org/feature/network.internet”/>
<icon src=“icon.png”/>
<tizen:privilege name=“http ://tizen.org/privilege/tv.inputdevice”/>
<tizen:privilege name=“http ://tizen.org/privilege/tv.window”/>
<tizen:privilege name=“http ://tizen.org/privilege/volume.set”/>
<tizen:privilege name=“http ://tizen.org/privilege/internet”/>
<tizen:privilege name=“http ://tizen.org/privilege/filesystem.read”/>
<tizen:privilege name=“http ://tizen.org/privilege/filesystem.write”/>
<tizen:profile name=“tv-samsung”/>
<tizen:setting screen-orientation=“landscape” context-menu=“enable” background-support=“disable” encryption=“disable” install-location=“auto” hwkey-event=“enable”/>
</widget>
Running this app on simulator, emulator or physical TV device, GET requests succeed but POST requests contain a ‘Origin: file://’ header. This is not accepted by the back-end:
Our project is a react-native-web app using Axios as network library.
How can we exclude this Origin header from POST requests?
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio