Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

  1. ioBroker Community Home
  2. English
  3. Development
  4. [Solved] CORS error when executed from configuration page

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.3k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.9k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.3k

[Solved] CORS error when executed from configuration page

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 618 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sonusfaber
    wrote on last edited by sonusfaber
    #1

    I'm trying to make http requests from adapters config page (developed with react).

    Here the http options:

    const options = {
    		method: 'post',
    		body: body,
    		logger: console,
    		// mode: 'websocket',
    		headers: {
    			Connection: 'keep-alive',
    			Accept: 'text/xml',
    			Pragma: 'no-cache',
    			SOAPAction: 'http://ws01.lom.ch/soap/listDP',
    			'Cache-Control': 'no-cache',
    			'Content-Type': 'text/xml; charset=utf-8',
    			'Content-Length': body.length,
    		},
    	};
    	try {
    		const response = await client.fetch('http://192.168.1.108/ws', options);
                     .....
    

    However I'm getting the following error message:

    Bildschirm­foto 2023-02-03 um 13.33.28.png

    The very same code works from the adapter code (main.js), without any CORS errors.

    Any ideas what I need to change when executing the code from react (adapter settings)?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sonusfaber
      wrote on last edited by
      #2

      Solved it myself. The configuration page is running in the browser, the adapter code itself is not. That's a separate process.

      Btw. Is is possible to delete forum posts?

      wendy2702W 1 Reply Last reply
      0
      • S sonusfaber

        Solved it myself. The configuration page is running in the browser, the adapter code itself is not. That's a separate process.

        Btw. Is is possible to delete forum posts?

        wendy2702W Offline
        wendy2702W Offline
        wendy2702
        wrote on last edited by
        #3

        @sonusfaber only admins can delete.

        Please edit your first post and add [Solved]

        Bitte keine Fragen per PN, die gehören ins Forum!

        Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        Support us

        ioBroker
        Community Adapters
        Donate

        752

        Online

        32.4k

        Users

        81.4k

        Topics

        1.3m

        Posts
        Community
        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
        ioBroker Community 2014-2025
        logo
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Home
        • Recent
        • Tags
        • Unread 0
        • Categories
        • Unreplied
        • Popular
        • GitHub
        • Docu
        • Hilfe