restrict Google API Key by HTTP referrer (client side) OR IP address (server side)

Is it possible to restrict Google API Key by HTTP referrer (client side) OR IP address (server side)?

The image below shows where I set this in the API console. The problem is that I have to choose the restriction by type (i.e. I can not restrict by HTTP Referrer and/or IP address).

Screenshot from Google API

Upvotes: 3

Views: 1647

Answers (2)

John
John

Reputation: 339

Why not create two API keys, one for each purpose?

Upvotes: 1

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117146

These are the only options that you have. You can choose one or the other not both.

Suggestion There is a feedback option in the upper right hand corner of the google developer console. What you suggest is a good idea i suggest you submit it as a feature request that it be possible to select more then one type.

Upvotes: 3

Related Questions