Nuxt.js: Proxy api call not working on netlify

Created on 4 Nov 2019  路  3Comments  路  Source: nuxt/nuxt.js

Version

v2.10.2

Reproduction link

https://github.com/amarmanhala/weatherapp/

Steps to reproduce

I have made the weather app in nuxtjs. its working fine in development, but when I hosted on netlify darksky api is not calling.
issue.png

i have used proxy package to secure api key in nuxt.config

proxy: {
'/api': {
target: 'https: i removed url
pathRewrite: {
'^/api' : '/'
}
}

What is expected ?

not working?

What is actually happening?

issue.png

This bug report is available on Nuxt community (#c9981)
bug-report

Most helpful comment

The proxy module does not work with nuxt generate as documented. Set up the redirects via Netlify itself :relaxed:

All 3 comments

The proxy module does not work with nuxt generate as documented. Set up the redirects via Netlify itself :relaxed:

@brankosimic I'd suggest to take a look at https://github.com/nuxt-community/netlify-files-module/ as well 馃構

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pehbehbeh picture pehbehbeh  路  3Comments

lazycrazy picture lazycrazy  路  3Comments

vadimsg picture vadimsg  路  3Comments

jaredreich picture jaredreich  路  3Comments

bimohxh picture bimohxh  路  3Comments