Skip to content

ENABLE_SWAGGER_ENDPOINT = false does not disable API docs page #4045

Closed

Description

@methodbox
  • Gitea version (or commit ref):
  • Git version: 1.3.2 (binary as your repo does not work on Ubunut w/Digital Ocean)
  • Operating system: Ubuntu 16.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I am running the binary version with the provided systemd service. It seems to run fine.

However, it ignores the setting ENABLE_SWAGGER_ENDPOINT in the /custom/conf/app.ini file.

Setting this to true or false changes nothing; the API URL still works, even after stopping/restarting the service.

For security I'd prefer to have this disabled. I will force a redirect using Nginx eventually but the config should work as per the documentation.

Screenshots

Activity

  1. lafriks commented on May 25, 2018

    @lafriks
    Member

    API can not be disabled as it is used also from web interface. This option just disables API documentation

  2. methodbox commented on May 25, 2018

    @methodbox
    Author

    No, it doesn't. It's still at /api/swagger. That's the purpose of this issue.

  3. methodbox commented on May 25, 2018

    @methodbox
    Author

    Updated title appropriately.

  4. jonasfranz commented on May 25, 2018

    @jonasfranz
    Member

    @methodbox I cannot reproduce that with the current master version.

  5. jonasfranz commented on May 25, 2018

    @jonasfranz
    Member

    This feature is only implemented since #3502 which will be available in the coming 1.5.0 release or in the current master version.

  6. lunny commented on May 25, 2018

    @lunny
    Member

    @methodbox Yes, v1.3.2 is not implemented yet.

  7. methodbox commented on May 25, 2018

    @methodbox
    Author

    Can you clarify what you mean by “master version”?

    Does this require compiling from the master branch?

    I’m using the binary linked from your site which is currently 1.3.2.

  8. jonasfranz commented on May 25, 2018

    @jonasfranz
    Member

    @methodbox The "master" version is the current development version which could be found at https://dl.gitea.io/gitea/master/ . For more information about our version system please have a look at https://github.com/go-gitea/gitea/blob/master/CONTRIBUTING.md#versions .

    The latest release is currently 1.4.1 and could be found at https://dl.gitea.io/gitea/1.4.1/ .

  9. methodbox commented on May 25, 2018

    @methodbox
    Author

    Kind of odd that the master branch isn’t the current release branch, isn’t it?

  10. locked and limited conversation to collaborators on Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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