Monaca Onsen UI Discord Chat Github Repo

Override user agent header in Monaca web IDE

  • Hi people, i am develop an app for a news site, for request new i need to send a custom user-agent in the headers request. I try to make a override by javascript but looks that is not possible, so i try with config.xml because i read in that is possible, but, no works. I set this on config.xml:

    <preference name="OverrideUserAgent" value="CRHoy" />
    <preference name="AppendUserAgent" value="CRHoy" />

    That not works on web IDE, also not works in the debugger app and not works in debub build for android. What i am doing wrong? Thanks for the help people and sorry for my english.

  • Monaca

    @pumble Did you use both of these preferences together? I suggest to just use <preference name="AppendUserAgent" value="CRHoy" /> alone. Then, tested on debug or release build.