Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong redirect #65

Closed
allevo opened this issue May 4, 2018 · 3 comments
Closed

Wrong redirect #65

allevo opened this issue May 4, 2018 · 3 comments

Comments

@allevo
Copy link
Member

allevo commented May 4, 2018

The redirection should be made with an absolute url and redirect to /documentation/index.html

https://github.com/fastify/fastify-swagger/blob/master/routes.js#L10

@mcollina
Copy link
Member

mcollina commented May 4, 2018

+1! PR?

@sjorsjes
Copy link

sjorsjes commented May 7, 2018

This also prevents us from using this in the root of a project. I want mine to be on
http://localhost:3000 but the config below creates a redirect to http://localhost:3000// which leads to an error: Fetch error - Not Found http://localhost:3000//json.

{
    swagger: {
        info: { title: '' },
    },
    exposeRoute: true,
    routePrefix: '/',
}

@mcollina
Copy link
Member

mcollina commented May 7, 2018

I'm currently swamped :/. It would be awesome to get a PR.

allevo added a commit to allevo/fastify-swagger that referenced this issue May 7, 2018
@allevo allevo closed this as completed in #67 May 9, 2018
allevo added a commit that referenced this issue May 9, 2018
* Fix #65

* Add pre-commit

* fix prefix

* Fix for nodejs6

* Fix for nodejs6 #2
@sjorsjes sjorsjes mentioned this issue May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants