You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { Editor } from 'ketcher-react';
import 'ketcher-react/dist/index/css';
import { RemoteStructServiceProvider } from 'ketcher-core';
const structServiceProvider = new RemoteStructServiceProvider(
'http://localhost:8002' + '/api/eln/ketcher/v2', // this my proxy url to '/api/v2'
{
'X-Token': 'token',
'custom header': 'value', // optionally you can add custom headers object
},
);
const MyComponent = () => {
console.log('headers', structServiceProvider.customHeaders);
// log headers {X-Token: 'token', custom header: 'value'}
structServiceProvider.customHeaders = { 'X-Value': 'value' }
// this also does't show on browser request headers
return (
<Editor
staticResourcesUrl={'/'}
structServiceProvider={structServiceProvider}
/>
);
};
Actual behavior
In the browser Request Headers, it doesn't show any X-Token, custom header, X-Value, and backend service doesn't recevice custom headers. Expected behavior
The Browser send custom headers to backend.
Screenshots
Desktop (please complete the following information):
OS: Ubuntu 22.04 and indigo-service in docker.
Browser: Chrome, edge
Version: 131.0.6.6778.140
Ketcher version [e.g. v2.4.2].
2.26.0 and 2.25.0
Test case
Add test case number (in EPMLSOPKET-* format) if bug was found during test case run.
Additional context
React 18.3.1
The text was updated successfully, but these errors were encountered:
I notice there are some routes without custom headers. /info is don't have, but /calculate with. So, I need split unauthorizad routes and authorizad routes, then proxy with different ways?
Steps to Reproduce
This is my code
Actual behavior
In the browser Request Headers, it doesn't show any X-Token, custom header, X-Value, and backend service doesn't recevice custom headers.
Expected behavior
The Browser send custom headers to backend.
Screenshots
Desktop (please complete the following information):
Ketcher version [e.g. v2.4.2].
2.26.0 and 2.25.0
Test case
Add test case number (in EPMLSOPKET-* format) if bug was found during test case run.
Additional context
React 18.3.1
The text was updated successfully, but these errors were encountered: