Skip to content

Commit

Permalink
fix: origin hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
gmpetrov committed Apr 24, 2023
1 parent b579653 commit 680402d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions components/ChatBubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function App(props: { agentId: string; initConfig?: AgentInterfaceConfig }) {
position: 'fixed',
height: '60px',
bottom: '20px',
zIndex: 9999999999,

...(config.position === 'left'
? {
Expand Down
2 changes: 1 addition & 1 deletion packages/chat-bubble/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@databerry/chat-bubble",
"version": "1.0.3",
"version": "1.0.4",
"description": "Databerry.ai Chat Bubble Widget",
"main": "chat-bubble.js",
"scripts": {
Expand Down
2 changes: 0 additions & 2 deletions pages/api/external/agents/[id]/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export const queryAgent = async (
const authHeader = req.headers.authorization;
const apiKey = authHeader && authHeader.split(' ')?.[1];

console.log('REQ HEADERS', req.headers);

if (!agentId) {
throw new ApiError(ApiErrorType.INVALID_REQUEST);
}
Expand Down
2 changes: 0 additions & 2 deletions pages/api/integrations/crisp/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ export const hook = async (req: AppNextApiRequest, res: NextApiResponse) => {
// const nbUserMsg =
// messages?.filter((msg: any) => msg?.from === 'user')?.length || 0;

console.log('HEADERS', req.headers);

if (req.headers['x-delivery-attempt-count'] !== '1') {
return res.status(200).json({
hello: 'world',
Expand Down
18 changes: 12 additions & 6 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,18 @@ export default function Home() {
src="https://cdn.jsdelivr.net/npm/@databerry/chat-bubble@latest"
></script> */}

{/* <script
src="https://cdn.jsdelivr.net/npm/@databerry/chat-bubble@1.0.2"
// src="dist/chat-bubble.js"
id="clgtujkqh022j0u0zw3ut8vk3"
data-name="databerry-chat-bubble"
></script> */}
{/* ts- next line */}

{
// @ts-ignore
<script
src="https://cdn.jsdelivr.net/npm/@databerry/chat-bubble@latest"
// src="dist/chat-bubble.js"
id="clgtujkqh022j0u0zw3ut8vk3"
data-name="databerry-chat-bubble"
></script>
}

<main className="bg-black min-heigh-full">
<Hero />
{/* <Image
Expand Down

0 comments on commit 680402d

Please sign in to comment.