Openocean APIs
  • Developer
    • ⚙️APIs
      • Swap API
        • Supported Chains
        • Contracts of Chains
        • Guide
        • API V4
        • API V3
        • SDK
        • Advanced Usage
          • GMX Exclusive API
          • Exact out
      • Gasless API
        • API
      • Limit Order API
        • Guide
        • API
        • Browser Wallet SDK
        • Private Key Wallet SDK
      • Sweep Swap API
        • Guide
        • API
      • DCA API
        • Guide
        • API
        • Browser Wallet SDK
        • Private Key Wallet SDK
      • Meme API
        • Data API
        • Transaction API
        • Websocket API
      • Ticket API
        • API
      • 🤖Swagger
    • 👾Widget
      • Getting Started
      • Customize Theme
      • Other Reference
      • Widget V2
        • Getting Started
    • ℹ️Developer Resources
      • 🚩Common Error Code
      • 📖Developer references & glossary
Powered by GitBook
On this page
  1. Developer
  2. Widget

Other Reference

Custom Mode

If you choose to integrate an iframe from https://widget.openocean.finance, some wallets might not work properly.

To address this issue, you can configure your server nginx like below, and the frontend iframe config should be the same as the OpenOcean widget.

Step 1 - Config nginx

server {
  listen 80;
  server_name app.openocean.net;

  proxy_ssl_server_name on;
  proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
  proxy_set_header Host "widget.openocean.finance";
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Real-PORT $remote_port;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  client_max_body_size 20m;
  location / {
    proxy_pass https://widget.openocean.finance;
  }
}

Step 2 - Config Front-end (for example: openocean.net)

<script>
  document.domain = "openocean.net";
</script>
<iframe src="https://app.openocean.net?domain=openocean.net"></iframe>

PreviousCustomize ThemeNextWidget V2
👾