Openocean APIs
  • Developer
    • โš™๏ธAPIs
      • Swap API
        • Guide
        • API V4
        • API V3
        • GMX Exclusive API
        • SDK
      • Limit Order API
        • Guide
        • API
        • SDK
      • Sweep Swap API
        • Guide
        • API
      • DCA API
        • Guide
        • API
        • 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
      • ๐Ÿ”—Supported Chains
      • ๐Ÿ“‹Contracts of Chains
      • ๐Ÿšฉ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
๐Ÿ‘พ