8000 How to set base URL in OpenSPG? · Issue #558 · OpenSPG/openspg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
How to set base URL in OpenSPG? #558
Open
@gustavorps

Description

@gustavorps

Problem Description

I'm working with an OpenSPG server instance running in a Docker container and need to configure the base URL for all endpoints. Currently, I'm using the server.servlet.context-path property to set the context path, but it's not working as expected.

command: [
  "java",
  "-Dfile.encoding=UTF-8",
  "-Xms2048m",
  "-Xmx8192m",
  "-jar",
  "arks-sofaboot-0.0.1-SNAPSHOT-executable.jar",
  '--server.server.servlet.context-path=/openspg',
  # Other configuration options...
]

What I've tried

I've attempted to set the base URL using server.server.servlet.context-path in the command arguments, but this doesn't seem to be working correctly. The endpoints are still accessible at the root path rather than under /openspg.

Expected behavior

All REST endpoints should be accessible under the /openspg path prefix.

Environment details

  • OpenSPG Server: spg-registry.us-west-1.cr.aliyuncs.com/spg/openspg-server:latest
  • Running in Docker container with Docker Compose
  • Using Caddy as a reverse proxy with the following labels:
      labels:
        caddy: local.dev
        caddy.@match.path: "/openspg /openspg*"
        caddy.route: "@match"
        caddy.route.0_uri: "strip_prefix /openspg"
        caddy.route.1_rewrite: "* {path}"
        caddy.route.2_reverse_proxy: "{{upstreams 8887}}"
        caddy.tls: "internal"
        # Other labels...

Questions

  1. What is the correct property to set the base URL for all endpoints in OpenSPG?
  2. Is the issue with my configuration approach or with the way OpenSPG handles paths?
  3. Are there any other settings I should be considering to properly configure the base URL?

References

I've consulted this StackOverflow post about setting base URLs in Spring Boot applications, but I'm unsure if OpenSPG follows the same configuration patterns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0